So, I've done my due diligence and searched the sub and Google to find an answer for this but to no avail. There have been posts here on the topic, but no answers.
In the past, prostitution was seen as a necessary evil, even by the notoriously prudish Catholic Church. Brothels seemed to be a common and regulated thing in Europe, China, Japan and America for quite some time.
So, what happened? In America it is mostly illegal, France criminalized it, Britain expelled them, and now, prostitution is specifically illegal in many, many countries.
What caused the acceptable "necessary evil" to become an illegal activity in so many places?
Was it disease? Pimping? Or just plain disgusted morality?
I think the best answer to a similar question likely comes from /u/itsallfolklore:
You may be interested in a very similar older question that I asked and drew a variety of answers of a various quality:
Additionally, /u/itsallfolklore has answer here and likely in a few other places:
If you plug his name, prostitution, and this sub into the unofficial reddit search from Pushshift, as an expert on the American West, you can see he has returned to the subject many times. His old AMA is another place to check out.