Middos, Chapter 2, Mishnah 2. The chapter has begun by laying out the dimensions of the Har HaBayit and the gates set into its walls. Now the mishnah turns from measurements to movement, and teaches a rule of conduct: once a person has passed through one of those gates, in which direction does he walk?
"Kol hanichnasin l'Har HaBayit," every person who came up onto the Har HaBayit, "nichnasin derech yamin." made his entrance toward the right. Whichever of the gates he used, the moment he stepped inside he veered rightward and kept along that side. This was a fixed practice, and its result was that all movement on the mountain flowed as one single counterclockwise circuit.
To picture it: a person who came in through the eastern gate turned to his right and proceeded along the wall, continuing around in the direction of the Tadi Gate, circling steadily until he reached the place he had come for. When he had finished, he did not double back. He continued along the same path, all the way around toward his left, until he arrived at the point where he wished to leave.
"U'makifin v'yotzin derech smol." They go around and take their leave by way of the left. His circuit continued in that same counterclockwise flow until he reached a gate positioned leftward from the one through which he had come in, and there he went out. Since the whole crowd advanced in one direction, nobody ever had to push against oncoming traffic.
The one who circles the other way
"Chutz mi she'eira'o davar," with the exception of a person to whom something had happened, "shehu makif l'smol." he makes his circuit toward the left. Such a man intentionally headed the other way, leftward, meaning clockwise around the mountain. With the entire crowd flowing opposite him, his situation could not possibly go unnoticed.
And that was the entire purpose of moving against the current: he wanted to be questioned. And questioned he was: "Mah lach makif l'smol?" What is it with you, that you go around toward the left?
One reply available to him was "she'ani avel," I am in mourning. A close relative of his had died, and he moved counter to the crowd so that his aveilut would be recognized. Whoever heard him answered with a blessing: "HaShochen babayit hazeh yenachamecha." He whose Presence rests in this House should comfort you. The Ribbono Shel Olam, whose Shechinah dwells in this very spot, should bring you consolation over the one you have lost.
The second answer was "she'ani menuddeh," because I have been placed under a ban. When a person refused to comply with a ruling of the Beit Din, the judges could excommunicate him until he submitted to their decision. A menuddeh is kept at a distance from other people; they do not eat and drink with him. Walking against the flow of the crowd expressed exactly that separation.
The passerby had a blessing for him as well: "HaShochen babayit hazeh yitein b'libam viykarvucha." He whose Presence rests in this House should put it into their hearts, the hearts of the dayanim responsible for the ban, that they bring you back close and lift what they decreed against you. So taught Rebbi Meir.
Rebbi Yosei's correction
Rebbi Yosei challenged this wording. "Amar lo Rebbi Yosei," Rebbi Yosei said to him: "asitan k'ilu," with such a formulation you have cast the court as though "avru alav et hadin," they had handled his case unlawfully, placing him under a ban he never deserved, and now we pray that they reconsider. But the Beit Din did precisely what it was obligated to do. The one who has to change course is the man under the ban, and not the judges who put him there.
Rebbi Yosei therefore reworks the blessing: "HaShochen babayit hazeh," He whose Presence rests in this House, "yitein b'libcha," should place it into your own heart, "v'tishma l'divrei chaveirecha viykarvucha," that you heed what your fellows are telling you, see where you went astray and straighten yourself out, and then they will bring you near and cancel the decree.