Here's a different example.

Most mothers would happily pay for a doctor or nurse to check their child's head for lice.

But how many mothers would pay for someone to give their child a hug?

In the primate world, checking for lice is one of the ultimate acts of affection and social cohesion, but in the human world it's just another 'service' that can be bought and sold.

I'm inclined to agree with MissX that the shame/stigma associated with prostitution is cultural, and not rational.