Judges must be objective, impartial and act without favour.
The judiciary.uk website says,
“It is vitally important in a democracy that individual judges and the judiciary as a whole are impartial and independent of all external pressures and of each other so that those who appear before them and the wider public can have confidence that their cases will be decided fairly and in accordance with the law. When carrying out their judicial function they must be free of any improper influence. Such influence could come from any number of sources…”
Would you be happy if the judge, (in a case in which you are a party), has represented your opponent on a private fee-earning basis prior to the hearing?