yet it did happen, in my experience, regularly. To lawyers on either side of a case.
Shrugging it off with a "trial judges are human and make mistakes" isn't a good answer.
Equivalent conduct on a football (soccer) pitch would get you at least a yellow card, maybe even a red card.
The hockey equivalent is probably a 10 minute if not a game misconduct for unsportsmanlike behaviour.
Most experienced enough litigators have had trials where one of the grounds of appeal they wanted to make was that the trial judge was biased and the bias affected the result or at least there's a reasonable basis for concluding that the bias may have affected the result.
That's a difficult argument to win except in egregious cases. If one is lucky, there are also significant enough errors of fact and law that will allow the appellate court to to intervene without having to deal with the actual or apparent bias issue at all.
The case below is an apparent example. I have set out excerpts.