"Thou shalt not murder" is a command God gave man during the Patriarch age. Gen 4:8-15. Gen 9:1-6. No person has the right to premeditate and take lives because all souls belong to the Lord. Ezk 18:4. Dealing with murder is to be solved in two ways. By the courts and by God Himself at the Judgment Day. Eccl 12:14. 2 Cor 5:10. Acts 25:11. Rom 13:1-5. 1 Peter 2:13-15. John 19:1-16. Murderers need to die, but when the court fails to use the power the Lord has ordained to it; killers become bolder. Eccl 8:11.
If a murderer name Jack is executed; he is deterred. Jack will never kill again. The death penalty is a deterrence to the one who is guilty and if another person named Tom didn't learn from the execution of Jack and he becomes a killer. Tom must suffer the same fate and he too won?t be able to kill a second person and both Tom and Jack are deterred.
If a robber named Ben is sentenced to ten years in prison for robbing a bank. Ben is deterred! For Ben won?t be able to rob a bank while in jail. And if a person name Fred didn't learn from what happen to Ben and goes out and robs a bank as well; let the same fate be imposed on Fred and he too will be deterred for ten years. Matt 5:26.