I do not disagree with you that there needs to be greater supervision and better mechanisms for dealing with police misbehavior. I do, however, disagree with this perceived "maliciousness" of the police and the judicial system, and I do not disagree with the fact that an officer's testimony is endowed with greater legitimacy and weight in the court.
One does need to know much about security work to know that police officers are far more exposed to violence and criminal behavior than any other professional group, by virtue of their line of work. Because of the nature of their work and the dangers they're exposed to, these people need extra protection from the law. You can't give someone a task without training them properly, empowering them with the means to perform said task or giving them protection from the expected harmful effects of such task.
Equals should be treated equally and unequals unequally, in proportion to their inequality.
In the case of police officers, these things manifest as the power to use force and the greater weight of their testimony in court, as they're trained and disciplined for such ends (hopefuly?), for the reasons already stated above. Take this example, for instance: you're a police officer attending to a situation involving a drugged up adolescent causing trouble in the middle of the night, you try to arrest him before he harms someone, but he attacks you and you shoot him in self defense and he dies. Said adolescent lived in that community for his whole life.
Now, tell me, without using the extra legitimacy of his testimony, how will this officer defend himself on court? Where will he find witnesses to point out that, during that exact moment, in the dark of the night, he acted according to every rule and law created to guide his actions in these situations? Will the local population jump to his defense, after seeing one of their community members bleeding on the concrete? Will they admit that the adolescent was in the wrong and a danger to himself and others, or will they react in the usual emotional and often irrational way?
We should not treat police officers as saints or heroes only due to the nature of their work, but neither should we expect sainthood from the general public. But the general public, under normal conditions, isn't subjected to the same conditions a police officer is exposed to in his/her line of work either. Thus, the extra legitimacy of the police's testimony serves to somewhat remedy this precarious situation that officers often find themselves in, and that sometimes even involve their families.
Of course, I do not claim to be unbiased in regards to this, because I am a son of a police sergeant, brother of another, and nephew to a police chief in the civil police (in the grand land of Br, the state police is divided into two major organizations, the military police, which handles ostensive pratrolling and the more common police work, and the civil police, which handles investigation work). I have lived in this environment for the entirety of my life, to the point I have received threatening phone calls from criminals and whatnot when I was younger. I know what these people are exposed to, and I also know of the ignorance of the general population in regards to this situation. Ignorance often creates the "us vs them" setting we seem to live in nowadays, and its no different in regards to cops x the general populace.