You're misunderstanding. You can hold that the killer isn't 'morally' responsible, ie: deserves to be tortured for their crime, but still imprison them indefinitely for the good of everyone else.
I think there are exceptions like Nuremberg trials where the executions were more of a revenge.