You might be under the mistaken impression that the US criminal justice system has anything do with justice.
After all, it's right there in the name: justice.
It's an old, worn out trope, but it's still true: there are in-groups whom the law protects but does not bind, alongside out-groups whom the law binds but does not protect.
Guess which group cops belong to?