Rabbi Yishmael taught: “You shall not act in accordance with the practices of the land of Egypt…and… in accordance with the practices of the land of Canaan…” If not, “I am the Lord your God” (Leviticus 18:4).15I am the One who administers justice to those who defy My decrees. Rabbi Ḥiyya taught: Why is [the phrase] “I am the Lord” written twice?16See Leviticus 18:2, 4. It is I who exacted retribution from the generation of the Flood, from Sodom, and from Egypt; it is I who will exact retribution from one who acts in accordance with their practices.

The generation of the Flood was eradicated from the world because they were steeped in licentiousness. Rabbi Simlai said: Everywhere that you find licentiousness, chaos comes to the world and kills the good and the wicked. Rav Huna said in the name of Rabbi Yosei: The generation of the Flood was eradicated from the world only because they wrote marriage contracts for males and females.17They wrote marriage contracts for men marrying men, and women marrying women.

Some commentaries argue that the text here should read as the text in Bereishit Rabba (26:5) reads: “for males and for animals.” This would mean that they wrote marriage contracts when men married men or when they married animals (Maharzu). Rabbi Azarya in the name of Rabbi Yehuda ben Rabbi Simon and Rabbi Yehoshua ben Levi in the name of bar Kappara: We find that regarding everything the Holy One blessed be He exhibits forbearance except for licentiousness alone, and this has many verses, as it is stated: “It was when man began….

The children of the great saw the daughters of man…. The Lord saw that the wickedness of man was great…. The Lord said: I will eradicate man” (Genesis 6:1–2, 5,7). The people of Sodom – Rabbi Yehoshua ben Levi said in the name of bar Kappara: All that night, Lot was standing and advocating on their behalf.

When they came and said to him: “Where are the men…and we will be intimate with them” (Genesis 19:5), with intercourse, immediately: “The men said to Lot: Whom else do you have here?” (Genesis 19:12). Until now, you had recourse to advocate on their behalf. But [now], “a son-in-law, your sons, and your daughters, [everyone whom you have in the city remove from this place]” (Genesis 19:12), “for we are destroying [this place]” (Genesis 19:13).

“I am the Lord” (Leviticus 18:4). It is I who exacted retribution from Samson, from Amnon, and from Zimri, and it is I who will exact retribution from one who acts in accordance with their practices. It is I who rewarded Joseph, Yael, and Palti ben Layish, and it is I who will reward anyone who acts in accordance with their practices. Joseph, from where is it derived?

Rabbi Shimon ben Gamliel said: They gave to Joseph from his own.18He was rewarded in a manner parallel to his righteousness. His mouth that did not kiss [nashak] in transgression, “by your directive, my people will be sustained [yishak]” (Genesis 41:40). His neck that he did not bend for transgression; “he placed a gold chain on his neck” (Genesis 41:42). His hands that did not grope in transgression; “Pharaoh removed his ring…[and he placed it on Joseph’s hand]” (Genesis 41:42).

His body that did not touch in transgression; “he dressed him in fine linen garments” (Genesis 41:42). His feet that did not walk in transgression; “he had him ride in his second chariot” (Genesis 41:43). The thought that he did not think, let it come and be called wisdom: “They called before him avrekh” (Genesis 41:43).19Avrekh is expounded: Father [av] in wisdom, tender [rakh] in years.