Ever wonder why prostitution became illegal?
Not to edit your question but I'll interpret it as why did prostitution became illegal in most US jurisdictions since it is legal in a good deal of Europe and elsewhere.
My view is that two separate drivers pushed prostitution to become illegal; tax issues and the same sort of moral revulsion that led to alcohol prohibition.
Oddly, a form of prostitution is legal everywhere in the US. I can freely pay actors to engage in sex acts and film it for others' sexual gratification. The legal subtlety is that the payment is for the filming, not the sex. I can even fill the role of one of the actors without violating the law.