כמעשה ארץ מצרים וכמעשה ארץ כנען לא תעשו", יכול לא יבנו בנינים ולא יטעו נטיעות כמותם? תלמוד
לומר "ובחוקותיהם לא תלכו" – לא אמרתי אלא בחוקים החקוקים להם ולאבותיהם ולאבות אבותיהם. ומה היו עושים? האיש נושא לאיש והאשה לאשה. האיש נושא אשה ובתה, והאשה נישאת לשנים. לכך נאמר "ובחוקותיהם לא תלכו" -ספרא אחרי מות ח,ח
"As the deed of the land of Egypt and as the deed of the land of Canaan, you shall not do," I might think they should not build or plant as they do; it is, therefore, written (Joshua 11:15) "and in their statutes you shall not walk." I have proscribed for you only those statutes which were instituted for them and for their forefathers and for the fathers of their forefathers. What did they do? A man would wed a man, and a woman, a woman. A man would wed a woman and her daughter, and a woman would wed two — wherefore Scripture states "and in their statutes you shall not walk." (Sifra, Acharei Mot 8:8)
I.e. it's not the way they build their buildings, but rather their abominable practices that are proscribed.