That's libertarian bullshit. Prostitution is regulated in Thailand, and there is a tremendous amount of human trafficking. Even in a legal market, it's cheaper to get the product for free.
Prostitution is NOT legal in Thailand, it's just that the law against it is not enforced. If you want an example of a country where prostitution is actually legal you have to look at the Netherlands, where there is very little if any human trafficking. Nevada is another example. (And, by the way, I'm not a libertarian.)