I find this very confusing because like. Sex work is a thing. If you want sex as opposed to emotional intimacy this is a mostly solved problem.
Keep in mind that in the US prostitution is banned in most places (except Nevada, and there it's only legal in less populous counties, and you can't do sex work there if you've done it elsewhere).
Up here, selling sex is legal, but buying it is illegal.
So you're running a definite risk by going to a sex worker, depending on what part of the world you're in.
Although if the Supreme Court finds in favour of Masterpiece Cakeshop in
Masterpiece Cakeshop v. Colorado, I can't wait for people to claim it's their sincere religious belief that they have to have sex with prostitutes whenever possible.