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.