Because if the State has made a mistake or has wilfully ignored evidence/obfuscated the evidence (which the CPS have been known to do) then that person who has been wrongly convicted can be released and steps taken to make the harm good be that with an apology setting the record straight and financial restitution for the damage done to their life.
If they're dead then there isn't anything that can be done. They're dead and that's that. As far as I'm concerned as long as there's even the slightest chance that a mistake can be made then the death penalty (even if I might think the likes of Harold Shipman, Ian Huntly, Myra Hindley, etc do deserve the death penalty) is unconscionable.
Of course the deterrent aspect only works if those committing the crimes actually think there's a chance they'll be caught. I think we're seeing that issue right now. Politicians love to prattle on about being "tough on crime" and introducing more and more laws with harsher sentences. But heaven forbid that they actually fund the police properly so that they can investigate crimes, that they fund the CPS so that they can prosecute crimes using the laws which, in most cases, are already sufficient for the task, that they fund the courts so that cases can be heard promptly in facilities that are fit for purpose, that they fund legal aid to make sure that we can all be certain that when someone is charged that everyone has access to proper representation, etc etc.
Doing those things of course is expensive and hard. Far easier to get a good splash in the Mail trumpeting how you're "tough on crime" whilst the entire system of criminal justice races towards total collapse. You could have prisons and sentences which wouldn't be out of place in Stalin's Russia but when the entire criminal justice system is in collapse it won't do much to deter crime!