States invent a legal framework that they can use to differentiate their civilian casualties from the civilian casualties of other groups they refuse to acknowledge.
That is what I mean by the state monopoly on violence. You can't legally beat your neighbor. A cop can. You can't shoot protestors, a national guardsmen may be able to.
The state devises a legal framework to justify its violence. Operating within this framework is designated as "peacekeeping action" or "law enforcement". Operating outside of it becomes "violence". Even though the actions are the exact same. It's all just kind of arbitrary is my point.