Babylon the great as woman and city
Here’s what it means
The immoral woman represents Babylon, the great ruling city/system that corrupts nations and persecutes the saints.
Why the Bible says it this way
In a prophecy or vision, an object or scene can stand for something else. The surrounding passage often explains the picture.
A helpful detail: Revelation 17:18 identifies the woman as the great city. Further historical identification is debated and should be separated from the explicit symbol.