It seems at first glance that when society or the state punishes crimes, it produces violence. But on the contrary, the actions of the state serve to minimize violence. How?
The purpose of the state is to deter private unjustly violent actions. Ideally, the mere threat of punishment would be enough; no actual punishments need to be inflicted. For example, if car thieves could be deceived about their chances of getting caught and convicted, it would not be necessary actually to catch and convict them. However, things don’t work like that, because punishments in the past and immediate present serve as evidence of the state’s policy. It is they that make the threat credible. Or rather, widespread knowledge or awareness of the state’s readiness to punish deters crimes.
And here’s how violence is minimized: the system of punishments should be so tuned and weighed that it deters more violence than it inflicts. The overall amount of suffering from unjust private violence + public violence from the state is supposed to be smaller than the corresponding amount of only private violence without the state.