The police were not looking for pedophiles in a public restroom they were looking for gay men.
There are laws against public (and public restroom) indecency but there is only one segment of the population the police feel it fair game to have these kind of crackdowns and to entrap.