Statistics bear this out. Since 1960 when capital punishment was basically discontinued, the number of murders rose sharply. This figure has remained somewhat constant through the years until lately. The answer is, states are reenacting the death penalty. Now undeniably capital punishment fails to deter some murderers, even in an ideal society, but no one not even God's Word promises it will deter every murder.
Capital punishment is justice first, and a deterrent as a by-product.
Yet the Bible reinforces this too. When the sentence for a crime is not quickly carried out, the hearts of the people are filled with schemes to do wrong. For rulers hold no terror for those who do right, but for those who do wrong. Then do what is right and he will commend you. For he is God's servant to do you good.