For some people capitol punishment may deter them from commiting illegal crimes, but some may just see death as a way to bot endure lifelong boredom in prison. I can't say from experiance, having never been in that kind of situation, but I almost would rather die then sit in prison for the rest of my life.
If you make someone suffer and you have free will you deserve to suffer yourself. Not die painlessly and go to heaven or eternal nothingness. If i was on trial for murder i would aim for the death penalty. I think that is an easy way out. I have no clue why so many people would rather live in prison than to die. Its probably not to rational. Prison is full of suffering and misery while death is the end which we are all going to get to anyway.
Generally, the people who commit crimes that get the death penalty are people who are prepared to die thus a greater punishment would me life in misery rather than escape.
However if capital punishment went for lesser crimes such as rape and child abuse, it would have a larger effect.