Our criminal laws are found in statutes and court decisions, and they generally reflect our shared societal values. But they are often applied or enforced unfairly or unequally.
Assault, battery and other acts of violence are crimes, whether you’re in law enforcement or just a private individual. If you are defending yourself or others from harm, you are allowed to use reasonable force. You cannot use excessive force and if you do you are guilty of a crime of violence. These concepts are extremely complicated in real life. They get especially complicated in situations like arrests or detentions. There are whole sets of laws dealing with things like resisting arrest. Do not assume that you know what is reasonable and what is excessive. This applies to both police and private individuals. You may think something is reasonable but you could be wrong, under the law. Think with your head, not your gut.
The fundamental truth is that violence is violence and people get hurt and there is no excuse for any of that.