That is the cost of punishment. Government incurs costs other institutions can't. That's why we have it.
I know you might have a hard time picking, but this isn't a cost-benefit analysis. We're talking about a virtuous state, supposedly self-governing, taking the life of a human being as punishment for a rule it created. Granted, the rule extends further than a mere artificial human creation, but where does government derive its power to kill?
I think, and this is just my opinion, government can kill only in the act of enforcing a law in action. That is, police can kill people, because that is simply the hallmark of government- the legititmate use of force.
But who gives them the right to take the life of one of its own citizens after he or she has been contained and is in police custody?
Government grants you security, freedom (indirectly through securing sovereign borders in combination with its own freedom principles), and provides you amenities otherwise unobtainable. To those effects, then, government has the right to retract those things, and place you in jail where you do not have security, freedom, or normal government-provided amenities (though you do receive others).
But government does not grant you life. They might protect it, they might facilitate it, they might help provide the environment in which it is created, but government did not grant you life. Thus it has no right to take it. Life is precious. It can only be taken in the immediate instance in which your existence will directly harm others, like if youre standing there with agun pointed at someone else. But in all other circumstances, the government has no right to execute you.
It is a barbaric practice that ought to be outlawed by the 8th amendment.