They don’t get tried in part because of Qualified Immunity (which has some rationality but I think we’ve taken it much too far), and in part because the structure of the system doesn’t incentivize it.
The people who would charge the officers are the same people who rely on the police to provide evidence. Both groups work closely together. Malfeasance by police typically provides the prosecution with evidence they want or people to charge. There’s no incentive other than morality to charge them, and a lot of reasons to find a way to rationalize it as untrue, or necessary, or whatever.