Rab Judah said in Rab's name: Hospitality to wayfarers is greater than welcoming the presence of the Shechinah, for it is written, And he said, My lord, if now I have found favor in thy sight, pass not away, etc. (Gen. 18: 3)
Abraham leaves off communing with G-d’s holy presence (Shechina) when he spies three strangers wandering past. The play on words is noted: He leaves his Lord and addresses the wayfarers as “my lord.”
This leads to a list of righteous acts:
R. Judah b. Shila said in R. Assi's name in R. Johanan's name: There are six things, the fruit of which man eats in this world, while the principal remains for him for the world to come, viz.: Hospitality to wayfarers, visiting the sick, meditation in prayer, early attendance at the study hall, rearing one's sons (!) to the study of the Torah, and judging one's neighbor in the scale of merit.
(Note that this runs counter to the better-known list from Mishnah Pe’ah which is in the daily prayers. But we’ll leave that for now.)
The text then focuses on the last item on the list and comments:
Our Rabbis taught: He who judges his neighbor in the scale of merit is himself judged favorably
In other words, one should judge another person’s motivations in the best possible light – the way we would want our own actions judged. A series of stories is told of individuals whose actions appear to imply immorality, but are in fact innocent or even based in higher values. For example an employer who appeared to be withholding wages when in fact he was upholding a vow, a righteous man who appeared to taking advantage of a young woman who he had rescued when in fact he was protecting her virtue.
In my experience, this is one of the hardest ethical ideals to uphold. We rush to judge others in the harshest light, while complaining that others judge us unfairly. We assign ourselves the purist of motivations while assuming the worst in others.
Judge others, the rabbis implore, the way you would wish to be judged.