You shall not show favouritism in judgement; rather you shall hear the small just as the great; you shall not fear any man, for the judgement is upon the Lord, and the case that is too difficult for you, bring to me and I will hear it. (Deuteronomy 1:17)
The need for a fair judicial system is one of the foundations of a civilised society and is listed as one of the seven Noachide laws which apply universally to non-Jews as well as Jews (Sanhedrin 56a).
Yet the verse does not only condemn corrupt judges. Rashi (d. 1105) among other commentators explains that the warning also relates to the beth din responsible for appointing the judges. The selection of the judges must be based on merit alone, not on extraneous virtues such as wealth, charisma or strength.
While few of us will judge in a professional capacity, we all have a tendency to pass judgement against others when we see them acting in a way that falls short of our own standards. All too often, in a breathtaking act of nepotism we effectively appoint ourselves as a judge over others we deem to be acting improperly, while our suitability and impartiality for such a role remains unchallenged. We form conclusions without knowing the facts of the case, without assessing all of the evidence or even giving time to hear a defence.
Our sin is twofold: we both appoint an unsuitable judge and pass judgement unfairly. Without the requisite knowledge of the case, we have no right to do either. It is therefore not just the courthouses that require a fair system of justice. We too must be mindful of the complexities of every situation, however damning the evidence may seem at first.
The Mishnah (Ethics of our Fathers 1:6) advises us to judge others favourably and relates directly to the last part of our verse. If the case is too difficult, we must refer it to God, the True Judge, for apart from exceptional cases, we are simply not qualified.