I mean, yeah, obviously the law is not a perfect guide to what is moral or just.
My point was that in many cases, the police are not even making it up to that standard. They are breaking the law and their own rules in order to punish the protesters for daring to challenge their (the police's) perceived right to be above the law.