None of the answers so far take into account a provider working for the cops. It doesn't happen often, but it DOES happen.
A typical scenario would be a working girl is arrested for possessing an illicit substance. In exchange for leniency, she agrees to work for the cops to set up prostitution busts. A hobbyist gets his wick wet, the provider gets paid, and as the guy is walking to his car he's arrested for the offense of prostitution. If pushed by the hobbyist's defense attorney, the state will reveal that the provider, who has immunity from prosecution,* will give evidence against the john.
*See
"Did you know Texas law allows providers immunity if they give evidence against a hobbyist?".