The perception of police is largely the way it is not because people don't understand that there are both good and bad cops, but because they have no faith that if a cop is bad or acts in a bad way, anything will come of it. A good cop will protect you from a bad person, but who protects you from a bad cop?
A huge amount of social interaction is based on the idea that there is a degree of recourse if something goes wrong. Nobody would sign contracts if you couldn't take it to court if the contract was broken. Nobody would rent out a home if there was no repercussions if the tenant burns it down. Police are given a huge amount of authority and power, for people to be okay with that there needs to be a belief that abusing that authority and power will be punished accordingly, and that's the part that is currently in question in a lot of places (not just the US, you just hear about the US a lot more because the whole world hears US news).