I don't think it's that simple.
IANAL but AFAIK it works like this.
Prostitution is illegal, therefor paying someone to have sex with you while filming it would also be illegal.
In porn, two people have sex consensual sex with each other for free. A third party pays the couple for the rights to record the event and commercially exploit the recording (that in theory might have happened anyway).
Actually, the argument is that prostitution is illegal because it's immoral, and porn though effectively the same thing is also immoral but protected under the first amendment. Hiring a prostitute and recording it is legal so long as you intend to distribute it.
Prostitution is illegal, therefor paying someone to have sex with you while filming it would also be illegal.
In porn, two people have sex consensual sex with each other for free. A third party pays the couple for the rights to record the event and commercially exploit the recording (that in theory might have happened anyway).