Well from a legal standpoint, the judge's bahaviour can be a cause of a judicial complaint and grounds for appeal.
So how would the public feel, if the offender has the opportunity to be tried again, even though he was found guilty, a new panel of a jury, all of the court costs, trial cost and cost to the public for the new trial and appeal.
That would far outweight the public's "need for a expression" of sympathy.
A Judge has to be impartial, without any "inappropriate expression of sympathy" or bias, conflict of interest, or caring either way how a case turns out.
If the judge "hugged" and showed sympathy toward the victim's family, then it can be argued that all through the trial he was not impartial because he cared and could have influenced the outcome of a trial.
Even one small off handed comment by a Judge can sink a trial or be ground for appeal..........