As other people have said the death penalty is about more than deterrence, it is about justice, which thomas aquinas tells us is '
The virtue of rendering to all what they are due’, now it is incontestable that if someone else murders another person they have deprived them of life, worse still if they have killed several people. What are they therefore due? If punishment must fit the crime, then nothing fits the crime of taking another persons life but that the person who took the life has his life taken away from him, in fact Justice demands it. There can be no equivalence between living, no matter how long that time be spent in jail, and not living, the only punishment which fits the crime of murder is the deprivation of life.
The death penalty is just because:
1)It gives murderers what they are due
2)It gives the victims of murderers what they are due (namely reparation)
3)It repays the murderers debt to society
It is worth nothing something that is often forgotten, death has a purgatorial value, one could even say a supreme purgatorial value, if it is accepted by the person it can expiate their sins (providing other conditions are met of course) and besides repay their debt to their victims and society. No amount of time in prison will be able to repay that debt because there is no equivalence between existence and non-existence they are complete opposites.
Nor is the death penalty ‘unloving’, it is incontestably more kind than locking a person up in a small cell for the rest of their lives, where they may spend 20+ hrs a day and besides are completely deprived of their liberty.
Lastly it is worth seeing what St Thomas Aquinas says on the matter:
The slaying of an evil-doer is lawful inasmuch as it is directed to the welfare of the whole community, and therefore appertains to him alone who has charge of the community. Now the care of the common good is entrusted to rulers having public authority; and therefore to them is it lawful to slay evil-doers, not to private individuals
ST, IIa IIae, q. 64, art. 3
Every part is directed to the whole, as imperfect to perfect, wherefore every part exists naturally for the sake of the whole. For this reason we see that if the health of the whole human body demands the excision of a member, because it became putrid or infectious to the other members, it would be both praiseworthy and healthful to have it cut away. Now every individual person is related to the entire society as a part to the whole. Therefore if a man be dangerous and infectious to the community, on account of some sin, it is praiseworthy and healthful that he be killed in order to safeguard the common good, since "a little leaven corrupteth the whole lump” (1 Cor. 5:6)
Summa Theologiae, II, II, q. 64, art. 2
The fact that the evil ones, as long as they live, can be corrected from their errors does not prohibit that they may be justly executed, for the danger which threatens from their way of life is greater and more certain than the good which may be expected from their improvement.
They also have at that critical point of death the opportunity to be converted to God through repentance. And if they are so obstinate that even at the point of death their heart does not draw back from malice, it is possible to make a quite probable judgment that they would never come away from evil.
Summa contra gentiles, Book III, chapter 146
Lastly it is worth looking at the point of view those who oppose the death penalty in all cases, most likely this is because they believe life is always an inviolable right. However this is clearly not the case, mosaic law laid down numerous circumstances where the lives of a person could be taken as a punishment e.g bestiality, sodomy, adultery etc… and in the new testament God strikes down Annanis and Saphira. Since then the Church has repeated this teaching through St Augustine and St Thomas Aquinas, who both explicitly supported the death penalty, not due to historical or practical considerations, but for permenantly valid theological reasons. People can lose their right to life through their moral actions, when this is the case society does not take their right to life away from them, they have already deprived themselves of that right, rather it enforces this deprivation. Life is given to us to save our souls, it is a means to an end, not an end in itself, if therefore a person is depriving others of this means, abusing this right thereby most likely losing their own soul, endangering others souls and even causing them to lose it, that person can be said to lose their right to life. It is up to the society to enforce this loss of right, through the judicial system and to work out what actions are sufficently grave to enable it to be known that they have lost this right, in accordance of course with natural and divine law.
Pope Pius XII said in a speech on the 14th of september 1952 '
Even when it is a question of someone condemned to death, the state does not dispose of an individuals right to life. It is the task of the public authority to deprive the condemned man of the good of life, in expiation of his fault, after he has already deprived himself of the right to life by his crime’
Roman Amerio says in his famous Book '
Iota Unum’ 'If one considers the parallel with one’s right to freedom, it becomes obvious that an innocent mans right to life is indeed inviolable, whereas a guilty person has diminished his rights by the actions of his depraved will: the right to freedom is innate, inviolable and imprescriptible, but penal codes nonetheless recognise the legitmacy of depriving people of their liberty, even for life, as a punishment for crime, and all nations in fact adopt this practice…'