SOME humans are a danger to all. There is something wrong inside them, and there has always been. They have allowed EVIL to live inside themselves, and they are a curse upon humanity and society.
In the case of THOSE sorts of humans, there is no possibility of redemption. There is no way they can be set free if they have been jailed. And since their crimes have EARNED them their deaths, it IS about justice.
The dead will NEVER injure another, not a fellow inmate in prison, not some innocent when released later by escape, by mistake, nor by some lame politician.
It will DAMN SURE prevent that criminal from committing another crime.