History is full of choosing who and what is acceptable to kill.
Generally speaking something that is a threat to you is on that list.
If a criminal is pointing a gun at my family or me I will pull the trigger on the criminal.
A convicted murder has proven that they are willing to kill others and are hence a threat to individuals in society.
So society prevents it from happening again.
Giving someone life in prison without hope of parole seems more cruel to me than ending it.