John Gill's Exposition of the Whole Bible
Leviticus 18:3
After the doings of the land of Egypt, wherein ye dwelt, shall ye not do,.... Where they had dwelt many years, and were just come out from thence, and where they had learned many of their evil practices; not only their idolatrous ones referred to in the preceding chapter, which it is certain they followed, Ezekiel 20:7; but also their immoral practices, particularly respecting incestuous marriages, after insisted on, some of which were established by a law among them; so Diodorus Siculus relates q, that it passed into a law with the Egyptians, contrary to the common custom of all others, that men might marry their own sisters; which is one of the incestuous marriages taken notice of in this chapter, and forbid:
and after the doings of the land of Canaan, whither I bring you, shall ye not do: which land had been promised to their ancestors and to them long ago, and whither they were now going under divine direction and guidance, to inherit it, and are here particularly warned of the evil practices among them, that they might avoid them: Maimonides r says, these are what our Rabbins call "the ways of the Amorites" (the principal people of the nations of the land of Canaan), and which, he adds, are as branches of the magic art; namely, such which do not follow from natural reason, but from magical operation, and depend upon the dispositions and orders of the stars, and so were necessarily led to worship them: hence, they say, in whatsoever is anything of medicine, in it is nothing of the way of the Amorites; by which they mean nothing else than this, that everything is lawful in which there appears a natural reason for it; and on the contrary, all others are unlawful: but here respect is had not to magical operations but to incestuous marriages, which prevailed among that people, and which they might have received from their ancestor Canaan, who learned them from his father Ham, of whom Berosus s writes, that even before the flood he corrupted mankind; asserting and putting it in practice, that men might lie with their mothers, sisters, daughters, and with males and brutes, or any other, for which he was cast out by Noah:
neither shall ye walk in their ordinances: which they ordained, appointed, and settled, for they were such a people the Psalmist speaks of, which framed mischief or wickedness by a law, Psalms 94:2; so Diodorus Siculus says of the incestuous marriage before referred to, and which the above writer, Berosus, derives from Ham their ancestor, that they are said νομοθετησαι, "to pass into a law"; but Aben Ezra puts another sense on these words, let no man use himself to walk in this way until it becomes an ordinance or statute unto him; custom is second nature, and in course of time has the force of a law, wherefore bad customs should be strictly guarded against.
q Bibliothec. l. 1. p. 23. r Moreh Nevochim, par. 3. c. 37. s Antiqu. l. 3. fol. 25.