The Way of the Gentiles
The prohibition against non-Jewish practices, might relate to the practices of ancient Egypt, Canaan or the social and philosophical ways of non-Jews today.
"I am a Jew. Hath not a Jew eyes? hath not a Jew hands, organs, dimensions, senses, affections, passions?…If you prick us, do we not bleed? if you tickle us, do we not laugh? if you poison us, do we not die? and if you wrong us, shall we not revenge? If we are like you in the rest, we will resemble you in that." (Merchant of Venice III:1)
Though Shylock asserts the common humanity of Jew and Gentile, the Torah proclaims that the Jew should, in fact, be different. God tells Moses to teach the people:
"I am the Lord, your God. Do not follow the ways of Egypt where you once lived, nor of Canaan to where I am bringing you. Do not follow their customs (be-hukotehem lo teileichu)" (Leviticus 18:1-3, cf. also, 20:23).
Deuteronomy suggests that this prohibition is intended to prevent idolatry:
"Take heed to yourself lest you be trapped by following them, after they are destroyed from before you; and lest you inquire about their gods, saying, 'How did these nations serve their gods?' that I may also do likewise" (Deuteronomy 12:30).
Avoiding Social and Cultural Practices
The language here is notably limited. The prohibition against "following them" applies specifically to the nations that will be destroyed upon Israel's conquest of Canaan. Maimonides (1135-1204), on the other hand, understands the prohibition as a sweeping law that prohibits any kind of assimilation to the customs of non-Jews.
"We do not walk after the ways of the idolaters. We do not assimilate ourselves to them; not in our clothing and not in other things like this, as it says, 'do not walk after the ways of the gentiles' (Leviticus 20:23)…Rather, a Jew should be distinct from them and recognizable through one's clothing and one's other actions, just as one is distinct from them in one's thoughts and characteristics" (Laws concerning Idolatry, 11:1).
Maimonides specifically mentions a diverse range of prohibited Gentile customs, including haircuts and using non-Jewish architectural models for Jewish buildings. In his laws concerning prohibited sexual relationships, Maimonides also considers sexual relations between women to be a violation of this law:
"Women engaging in sex with each other is forbidden under the category of Egyptian behavior against which we have been warned 'Do not act like the Egyptians' (Leviticus 18:3). Our sages said, 'What would they do? A man would marry a man, a woman would marry a woman, a woman would be married to two men."
For Maimonides, lesbian sex is prohibited only as a form of assimilation to Egyptian ways (and, in the case of a heterosexually married woman, also as rebellion against her husband). Significantly, this application extends the prohibition of imitating the non-Jew to include private acts, even though, according to Maimonides, the prohibition was put in place so that Jews would be recognizably distinct.