I used to hate the police, partly because I felt rebellious and cool, but also because I thought of the police as some kind of ominous, threatening, and oppressive force that wants me to stop smoking drugs.
As I became interested in how the world works, I began to see the childishness of this notion and began to perceive the police as what it actually is: a huge group of normal people who are employed to frequently face dangerous people to protect me and everyone I love.
Theoretically, if everyone was truly healthy and happy- and I mean happiness where everybody's walking around in unconditional love- the police force as an institution wouldn't be needed because there would be no crime.
I obviously have a partial view like everyone else, so I'm not saying that I know everything about the police, but it seems that the goal's of the police are in complete alignment with how I want the world to be:
Hatred toward the police surely comes from a fear of the police, which surely comes from, in my view, a skewed perception of the police- one that is informed by small-picture thinking and anecdotes. If someone told me that a large percentage of the police force kill people and do horrible things, I would doubt it, then say "We should still love the police because people who hurt other people already have enough pain inside, so we shouldn't add any more by hating them. Perhaps we should prioritise their mental health at the government level, and prioritise their mental health on a personal level, which looks like loving them, thanking them."