Why is it everyone hates cops until they need one?
Because most people never have any contact with them unless they've done something wrong. Very few people have a 'positive' contact. Some people don't like the idea of cops just lurking around waiting for someone to screw up.
I was a Police Officer and then spent 15-years as a State Trooper. I cover most of NE Ohio. That includes my time up in Cleveland on IS 480. I've seen a couple State Troopers that would racially profile, police beating up a guy for fleeing. Hell, I caught Cleveland Police chasing a guy down the highway 30-miles outside of the city. No lights. No siren. They were told to break it off, but they kept after this guy. I think they were going to beat his ass whenever he finally stopped. Fortunately the guy sped past me.
I've seen some shading stuff and cops looking for any reason they could to pull people over.
I've also seen some departments that were top notch. The kind you knew you could call for anything you needed and they would be there.
Now, not all cops are bad. There are still a ton out there that will help you out and are polite/courteous. You just don't hear about those guys. You just hear about the jerks.
I use to like to stop in a gas station and grab a soda and hang out for a little while during my shift and actually talk to people so they could actually have a positive contact without being pulled over.
When I retired in 2005 I was tired of the Highway Patrol. I liked the job but was tired of dealing with management. I had been yelled at for taking to much time helping people and got tired of the screw the public attitude. Before I left they had started this (2) stops per hour rule and were really hung up on the numbers. It doesn't surprise that the Highway Patrol has all the problems and all the scrutiny they're getting now.