They're rich because they have a large organization capable of carrying out organized crime. They're also do extortion, kidnapping, pimping, and anything else they can think of to make money.
Yeah but the most money can be done by dealing with drugs. Extortion or the other stuff is small fish compared to drugs - it's a pest for the small businesses but in the end it's passed on to customers. Pimping is vile but can be helped against by empowering sex workers, and the number of whores on the streets should be identical even after an end of drug criminality.... after all, the number of customers in a city should remain constant (if not shrink a bit because the gang-financed customers vanish).
You are assuming prostitution is driven by demand-side concerns alone (or that eliminating trafficking gangs has no effect on the supply side.) Trafficking gangs using addiction to trap people into prostitution is not unknown, so eliminating criminal trafficking gangs should have supply-side impacts as well.
I was thinking about the angle "the drug trade vanishes, so the gangs will drift into pimping" - which is, imho, not really valid since where prostitution is illegal, the gangs are already in pimping and the supply/demand is more or less matched, so there are no new profits to be made there.