I think the entire concept of "perfect justice", or "deserving" punishment, or even "punishment" itself is nonsense. They are an integral part of most cultures, to be sure, and they're very likely an integral part of human nature. But still nonsense.
The logic behind punishment is basically that by inflicting pain on the criminal, somehow the original crime will be wiped away, or that a victim of a crime, for some reason, has the "right" to inflict similar pain on the criminal. But what on Earth is the use in that? The original crime won't go away - all a punishment does is cater to the sadistic desire for revenge that most of us unfortunately display.
Of course, deterrent is a whole another thing. It makes perfect sense to have harsh punishments in place for crimes, because that way people will have much less incentive to commit them - and it's clear it's in our common interest to make crimes as unappealing as possible. That's why it's perfectly sensible to punish criminals according to their crimes.
That also happens to be the reason why it's sensible to punish criminals humanely and attempt to rehabilitate them. After all, a rehabilitated prisoner is worth much more to the society than one incarcerated for life is. Death penalty is another matter, of course, but there are several reasons why it's also a bad idea, and not all of those are moral issues.
But wanting to kill, torture or imprison for life a criminal because "they deserve it" or because "justice demands it" is nothing but sadism, the primitive desire to destroy or subjugate anyone perceived as an enemy. It's archaic, it's disgusting, it's ineffective and it's illogical - yet otherwise logical and moral people still defend the practice.