Here "Sodom," "Gomorrah," and "cities" represent the people who lived in them. Alternate translation: "the people of Sodom and Gomorrah and the people in the cities around them" (See: [[rc://en/ta/man/translate/figs-metonymy]])
"engaged in every kind of sexual immorality and all of the perverse sexual acts they desired." The sexual sins of Sodom and Gomorrah were the result of the same kind of rebellion as the angels' evil ways.