As we are in the middle of the Torah portions that deal with our redemption from bondage, we often overlook the extreme decadence of Egypt.
The Rambam uses a general term to describe decadence, in general, with the words, כמעשה ארץ מצרים, like the acts of Egypt. In הלכות איסורי ביאה, he defines what מעשה ארץ מצרים really was.
Not only did it refer to lesbianism and homosexuality, but it even included same sex marriages.
If that wasn’t decadent enough, we learn that there were ten portions of sorcery and witchcraft in the world. Egypt had nine of these portion.
In short, if you want to find a place where man has sunk to the lowest levels of degradation, it was Egypt. Perhaps the greatest miracle of all is that our ancestors lived in this place for 210 years, and managed to come out and form a ממלכת כהנים ועם סגולה, a nation of priests and a holy nation.