The deterrent is simple....
The state kills a person convicted of murder. If they are dead.. they don't kill again.
And sooner or later.. someone that is thinking about killing someone will say..."whoa....if I am caught, I could die."
If that were to happen Just Once... then the theory is sound..