If person A is happy to pay for a service, person B is happy to provide it and persons C, D, E, et al aren't harmed by the transaction, then there would seem to be every good reason for the service to exist.
The wife is not supplying the amount or quality of sex that is desired and the husband needs a replacement......a prostitute.
The male may not be able to sustain a strong and meaningful relationship with a woman and compensates by casual sex.
The excitement and daring end to a night out with the "boys".
The above remarks are made in reference to a heterosexual relationship as i have not the experience or knowledge of the needs of a homosexual relationship.
Life is 'prostitution' IMO we are all guilty of it in one way or another.
Work is a primary example, especially if you're in a job you don't particularly like doing.