It's just like wanting to bang a firefighter or even a military guy, there's no denying that policemen are very popular with a lot of gay men. Whether it's just roleplay or there really is a chance to get in bed with an actual policeman, gay guys fawn over these men as there is just something about their authority that makes them want to go do bad things just so that they would get caught and touched, especially in those sensitive places.
Those guys love seeing guys in uniform and would do anything to be able to 'fuck' those policemen. On the contrary, it's the other way around. But on the other hand, there are those who take that line in a different light.
In their case, they're angry at those who are in the force, as they are usually subjects of discrimination, even if they're not really doing anything illegal before, during, or even after they've been apprehended by these uniformed officers. You most probably heard a lot of rappers saying 'fuck the police!' in one of their songs.