In cities where prostitution is legal - Amsterdam being the most famous example - the formation of a red light district is pretty obvious. For whatever reason, one particular neighborhood became known as "the place to go to buy sexytimes," and all the other providers just followed the market. It's no different from the formation of a Chinatown, or a garment district, or a wealthy shopping area. Once you have a lot of people going to one particular area to buy one sort of thing, it's only natural for other sellers to move into that area, too.
All well and good. But what about in cities where prostitution is not legal? In Seattle, for example, you have the Aurora Strip: a length of Highway 99 bounded by the Aurora Bridge on the south and transitioning out around about 100th street at the north. This length of urban highway is covered in adult book shops, seedy motels that don't ask a lot of questions, prostitution and drugs (both selling and usage).
This part of Aurora is absolutely jam-packed with illegal activity at all hours of the day and night. So why don't the police stop it? Certainly there is a police presence on Aurora, keeping the worst of the offenses at bay. But if all the cops and lawmakers know where the "bad stuff" is happening, why does it continue?