I think the value of punishment is in empowering the victim or making an example.
The value to the victim in punishment is in reclaiming agency. If the state punishes someone, the victim gets nothing. It's a waste. Maybe less than a waste; the opportunity for personal revenge for a personal wrong is lost.
Some things will not be deterred by consequences, imposed or otherwise, and the victim can't/won't take agency from revenge, so punishing them is absurd.
Sometimes you just need a fucker gone. Nazis and stuff. It's not about punishment, unless you're trying to deter. It's about not having that in the world and being unable or unwilling to spend the resources to fix the problem in a more wholesome way.
Even then, is the value worth the cost? The mechanisms of organized punishment and deprivation existing? The culture of interpersonal violence? Generally no. But the discourse about 'crime' ignores literally fucking all of this.