Rabbi Berekhya said: The Holy One blessed be He said to Moses: ‘Go and say to Israel: When you were in Egypt, you were comparable to a “lily between the thorns.” Now that you are entering the land of Canaan, be like a lily among the thorns; make certain that you do not act in accordance with the practices of these, or in accordance with the practices of those.’ That is what is written: “[You shall not act] in accordance with the practices of the land of Egypt [in which you lived, and you shall not act in accordance with the practices of Canaan where I am bringing you].”

Rabbi Yitzḥak interpreted the verse regarding a person who had two daughters from one mother, both of them from one father, both of them from one fetal sac, just as it says: “The sons of Ham: Kush, Egypt, Fut, and Canaan” (Genesis 10:6).11These sons, including Egypt and Canaan, are listed together, implying that they are like identical twins with similar characteristics. Rabbi Ḥanina said: This is analogous to a king who had an only daughter and he settled her in a certain alleyway where they were all practitioners of licentiousness and practitioners of sorcery.

He said to her: ‘Make certain that you do not act in accordance with the practices of these, and in accordance with the practices of those.’ So too, when Israel was in Egypt, the Egyptians were practitioners of licentiousness, as it is stated: “Whose flesh is the flesh of donkeys” (Ezekiel 23:20).12They were unrestrained, like animals. When they entered the land of Canaan, the Canaanites were practitioners of licentiousness and practitioners of sorcery, as it is stated: “Due to the great licentiousness of the harlot, blessed with grace, practitioner of witchcraft” (Nahum 3:4).

The Holy One blessed be He said to them: ‘Make certain that you do not act in accordance with the practices of these, nor in accordance with the practices of those.’ That is what is written: “In accordance with the practices of the land of Egypt….”