The Torah was given 3,331 years ago, roughly half a millennium before the Greeks and the Romans were even a civilization (and even then, still in the Late Homeric Age), let alone one with the means to travel to (or conquer) Egypt. This was during the end of the Bronze Age when the Canaanites were still a nation (14th century BCE). When the Torah speaks of the Egyptians it does so prior to the mention of the Canaanites; and the Canaanites, as a force, vanished some 3,300 years ago. The Ancient Egyptians not only practiced homosexuality but bestiality as well, including zoolatry (worship). It is also by reason of the Egyptians – namely the Chartumim (magicians) among them – that we are prohibited from performing any type of sorcery or soothsaying, or inquiring of the dead.
"There shall not be found among you anyone who passes his son or daughter through fire (Molech worship), a soothsayer, a diviner of [auspicious] times, one who interprets omens, or a sorcerer.. or one who casts spells, consults ghosts or familiar spirits, or inquires of the dead.. For whoever does these things is an abomination to Hashem.. (Deut. 18:10-12)."
Why? [Aside from idolatry and wickedness,] these were the practices of the Egyptians (Ex. 7:11, 22; 8:3, 14) and the Canaanites (Lev. 18:21, 24).
"Like the practice of the land of Egypt, in which you dwelled, you shall not do, and like the practice of the land of Canaan, to which I am bringing you, you shall not do, and you shall not follow their statutes (Lev. 18:3)."
As our Sages tell us: "עשרה קבין כשפים ירדו לעולם תשעה נטלה ארץ מצרים—Esrei Kabin Keshafim Yardu l'Oilam Tish'ah Natlah Eretz Mitzrayim—Ten kabin [measures] of witchcraft descended into the world; Egypt took nine (b. Kid. 49)."
Similarly, Avos d'Rabbi Nasan (28:1) reads: "ואין לך כשפים ככשפים של מצרים—v'Ein L'cha Keshafim ka'Keshafim shel Mitzrayim—There is no witchcraft like the witchcraft of Egypt."
Sifra Akharay Mos, parsha 9:8