The great city is morally compared with Sodom and oppressively compared with Egypt.
How to understand this phrase
Keep in mind
The text explicitly says the names are spiritual/figurative and also says the Lord was crucified there, anchoring the description in a real city.