system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How come police posing as prostitutes isn't entrapment? And why can the undercover officers not be charged with prostitution?

It seems to me like they are creating an illegal situation. I see it on COPS all the time.

In order for the "John" to commit a crime, he first has to agree to pay for sex. The sex has to be offered in the first place, so how come the undercover officer cannot be charged with prostitution?
gpt
It isn't entrapment because the undercover cop isn't forcing any of the johns to pay for sex.  The logic is, if the john did not solicit sex from the cop, he would have done so with another girl.

As to why the cop doesn't get charged, undercover police officers are given certain immunity from the law in order to do their jobs.  As long as they stay withing reasonable limits, they won't get charged.