The traditional justifications are incapacitation, retribution, rehabilitation, and deterrence, and the thing you describe as working after you say deterrence doesn't is actually a combination if general deterrence andand the exemplary element of retribution.
And justification of criminal punishment is always important, because you can't evaluate a policy without doing so in context of the purpose it is intended to serve.
And justification of criminal punishment is always important, because you can't evaluate a policy without doing so in context of the purpose it is intended to serve.