Prisons are only for people we can prove are guilty of crimes. Just being guilty isn't enough.
Of course, as people, the social judgment about guilt can be done however you'd like. I tend to be a bit nuanced, but there's a lot of wisdom is hard thresholds of guilt there too. Don't shame or side-eye anyone until they're probably guilty, then give them the burden of establishing their place in society.
But imprisonment (all criminal justice, really), isn't the same as etiquette, or social judgment.
You can't really even get justice in a justice system. That's an insane pipe dream, give up on that immediately. If the world was just, the crime wouldn't have ever happened. Even the vague approximation of justice we feel in our hearts is unlikely – for instance, in cases where we decide the person should die for having committed it, we don't let the victims extract their vengeance. It's a bit barbaric to consider, but even eye-for-an-eye is better justice than, you took their eye and now I'll take yours.
Brutality of punishment isn't the issue, although I understand why, in seeing a lack of justice, there's an instinct to make someone hurt more to try and fill the gap. That's pretty human – I think it may be impolite to say, but any victim of actual crime surely understands. But the criminal justice system doesn't need harsher punishments. It's just been signed up for a task it cannot complete. That's why it doesn't work.
Which is, honestly, a huge relief.
We live in a world where someone could kill your wife, and instead of going Death Wish, you just move on as best you can. People get punished for a variety of reasons – one of them is that it does get closer to justice – but at the end of the day we live in an unjust world, and the system forces us to just deal with that. Violence isn't escalated. And we keep the peace.
Sometimes I worry I have to defend the basics of a constitutional republic to people. But there is wisdom in establishing constraints to any power that cannot be opposed. And if you want something done with that power, it needs to be filtered through the wisdom of people we've chosen to exercise that power. This system has a lot of wisdom in it, more than a pure democracy.
And one of those limits is that we don't punish guilty people. Well, not all of them. Just the ones we can prove. When we use the government, the power no one can resist, we use it carefully. It sort of sucks, but it sucks a lot less than other systems.