The government exists to protect the people and such protection comes at the cost of freedom. However, the cost of that freedom is negligible compared to the benefits of law and order. The death penalty is just the most extreme punishment available for use at the discretion of authority, as it as been sense the beginning of time.
And in a democracy, the government is the people, don't forget that. You are the one that grants the authority for capital punishment.