The simple answer to that question is that's not why we execute criminals. "(W)e kill people who kill people," to discourage other people from following in their footsteps and to mete out justice for the victims and their families.
To be blunt about it, some people just deserve to die and if we can give them what they deserve in such a way that it saves other lives, that's a good thing.
"An eye for an eye makes the whole world blind." -- Mahatma Gandhi
Violence may not solve everything (That quote still works), but conversely, that doesn't mean it solves nothing. In fact, it's fair to say that violence has been the greatest problem solver in the history of mankind, which is why we still have fights and wars despite all the problems those activities have caused throughout human history.
If anything, we've gotten to a point where we're so far beyond avoiding taking an "eye for an eye" that we've actually started creating longer, more miserable conflicts as a result.
Look at Israel, for example, where you have ragtag gangs of Palestinian terrorists that have been fighting for decades with a military power capable of utterly crushing them in a few weeks time. Look at our own war on terror, where we're wringing our hands about the "suffering" the terrorists may experience during the two minutes they're being waterboarded. Meanwhile, they're gleefully torturing our soldiers to death with power tools.
The point is not that we should always take an "eye for an eye." It's that violence does often work, there is a time to use it, and when we do need to use it, trading a tap on the wrist for a plucked eye isn't necessarily the best strategy.
New White House Press Secretary: Of Course Obama is The Most Transparent President in History | Katie Pavlich