Another word for prison is Penitentary. As in penitence.
The idea - and this long predates the Political Correctness of the 20th/21st Centuries is that it's a place for people to reflect upon their crimes. And ideally, repent. Something that doesn't happen often, granted, but it does happen.
A religious person (Judaeo/Christian/Muslim) who promotes executions is doing exactly what religious people condemn in suicides - usurping God's right to determine how long a person has to repent or otherwise be useful before they're called to account. And the Bible indicates in no uncertain terms that a person doesn't have to be a model citizen to be useful for God.
A non-religious person is on firmer ground, but in practical terms, a lot of people would have been glad to see Hirohito executed for the atrocities committed in his name during WWII. As an emperor, he may not have provided the best moral compass, but he did provide noted contributions to the field of Marine Biology after the war. Nelson Mandela was up for the death penalty, but having been spared, he and Botha later did what was almost inconceivable - converting South Africa to black majority rule without major bloodshed or revenge-seeking.
It's all well to summarily declare that convicted felons are a "waste of oxygen". In many cases they are, but that's hardly justification to dispose of the manure before picking out the diamonds.
Plus, even if we don't want to harvest such slim pickings, there's the final practical bean-counter consideration. In the USA, the appeals process is extensive and expensive. More so than merely warehousing "oxygen-wasters" for a few decades. We could, of course, reduce or eliminate appeals. Hell, we could simply tear them apart in the streets Pakistani-style. But once upon a time, we had concepts like "assumed innocent until proven guilty" and "better 1000 guilty go free than 1 innocent be punished" and despite vigorous efforts over the last 20 years or so, there are still shreds of this attitude in the US justice system. And it costts money and we still end up executing a few innocent people every year.
There are countries that the USA likes to consider itself morally superior to that do not support a death penalty. Conversely, most of the countries that still do are not on the whole a crowd to brag about hanging around with.