While military uniforms are fairly ionic, most of the images drilled into our head are only regarding the men wearing them. Naturally there are legitimate reasons the appeal goes beyond the style of fabric composing the uniform. When it comes to police uniforms, it's a completely different set of conditioning that evokes a mental response. Instead of the uniform indicating something about the wearer, it not only connotes power transcending the individual but also one that can at times be adversarial. You're not exactly apt to feel nervous if someone in a military uniform is observing you, but anyone who has violated a minor law (burnt out headlight, speeding, etc) and been reprimanded for it is likely to feel somewhat nervous being observed by a cop. It doesn't mean you're going to feel like your play partner is going to arrest you of course, but the image is still there in your head.
For those unfamiliar, the cop in the first two pictures is the one who bought the homeless man boots in NYC. Not that I want to objectify such an amazing man but holy shit is he hot!