And here he was casually conversing about it. A prison is part of a penal system, that is, a system of punishment. In punishing someone we are intentionally inflicting harm. To be morally congruent the practice of punishment needs a justification. Consciously or not we formulate answers to why we are entitled to harm someone.
Punishment requires good consequences for it to be morally acceptable.
There is no evidence that the death penalty has any special deterrent effect. There may be some legitimate fear from the family affected by the crime. If I imagine myself in their place, I may indeed have some fear about what the criminal would do if he or she were released. And as for rehabilitation, implicit in the death penalty is the sense that there is no rehabilitation possible. This lack of belief in human potential is one of the saddest consequences of the death penalty.