Rabbi Elazar said: The entire Torah is contingent on justice, that is why the Holy One blessed be He gave laws after the Ten Commandments. Because people pervert justice, He exacts retribution from them and teaches the entire world that He overturned Sodom only after it perverted justice, as it is stated: “[Behold, this was the iniquity of your sister Sodom…] pride, surfeit of bread and tranquil calm, [but she did not support the hand of the poor and indigent]” (Ezekiel 16:49).
Jerusalem, too, was not exiled until she perverted justice, as it is stated: “They will not provide justice for an orphan and the cause of the widow will not come to them” (Isaiah 1:23). Why did the Holy One blessed be He give the crown to Judah?76The kings of Israel descend from the tribe of Judah. It is not that he was mightier than his brothers; were Simeon, Levi and the others not mighty? Rather, it is because he adjudicated a true judgment for Tamar;77See Genesis 38:26. that is why he became a judge of the world.78In ancient times, the king served as the highest judge in the land.
This is analogous to a judge who adjudicated the case of an orphan girl that came before him and he exonerated her. So too, the case of Tamar came before Judah, and [her sentence was] to be burned, but he exonerated her because he found merit on her behalf. How so? Isaac and Jacob were sitting there, as well as all his brothers, and they were protecting him.79Although they recognized that the signet ring, cords, and staff presented by Tamar (see Genesis 38:25) belonged to Judah, the presentation of these artifacts did not prove that she had not engaged in a forbidden relationship.
Judah acknowledged the Omnipresent and said the truth of the matter, and said: “She is more righteous than I” (Genesis 38:26). The Holy One blessed be He appointed him king. Likewise, ben Zoma would say and expound: You were shamed in this world; you will not be shamed in the World to Come in front of the Holy One, blessed be He, who is a consuming fire. Why?
Because the shame in this world is nothing compared to the shame of standing [guilty] in the World to Come, as it is stated: “Therefore, everyone who is pious should pray to You [at the time of searching]” (Psalms 32:6).80The time of searching is expounded to mean the day of death. The previous verse states: “I acknowledged my sin to You; I did not hide my iniquity. I said: I will confess my transgressions to the Lord.
And You forgave the guilt of my sin, selah” (Psalms 32:5). Thus, this is understood to mean that every pious individual prays that he has the strength to confess his sins before he dies.