The beauty of drug dealing (from a criminal's perspective) is that it's easy and profitable - there's a high demand from customers willing to spend a lot of money on drugs, and enforcement is very poor (judging from the ease end-users can buy drugs). Prostitution is very similar. So, if you legalize all businesses with which criminals easily earn a lot of money, a lot of them will be economically incentivised to start participating in legal businesses.
And the alternative ways to make money for a self respecting criminal are getting harder every day. Cars are more difficult to steal, people use a lot less cash, you have CCTVs everywhere, now the police even collects DNA for a robbery. I can't think of an obvious substitute to drug trafficking for these criminals. I would be also ready to bet that Tinder must have made a dent in the prostitution trade!
But not all drug traffickers are Tony Montanas, there are legions of petty criminals, or even workers who make money on the side dealing drugs.