Jude says Sodom and Gomorrah and surrounding cities serve “as an example” by undergoing “a punishment of eternal fire” Jude 1:7. He cites them as a warning example tied to immoral desire and rebellion Jude 1:7.
In Jude 1:5–7 Jude calls his readers to remember three well-known past judgments. First, the Lord rescued a people from Egypt yet later destroyed those who refused to trust. Second, certain angels abandoned their assigned place and are now held in dark custody awaiting a coming day of judgment. These verses follow Jude’s warning that certain people have slipped in and are twisting the community’s life and message (verses 3–4). Jude’s strategy here is not to introduce new information but to re-activate shared memory: “you already know this,” yet you need it brought back to mind.
Jude 1:5–7 works as a set of reminders.
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Jude 1:7, then read the surrounding section so the answer stays connected to the passage's flow.
7Even as Sodom and Gomorrah, and the cities around them, having, in the same way as these, given themselves over to sexual immorality and gone after strange flesh, are set forth as an example, suffering the punishment of eternal fire.