This is how humans work. We work on probability and approximation. We often act based the consequences of our intentions, not the consequences of our actions.
Someone that learns the consequences of their actions, regrets the harm they inflicted, and changes their behavior as a result, is not the same danger to society they were before. In fact society would be better off reintegrating them because they'll tell others not to do the same thing.
I'm not exactly sure where to fit this in, but people change. A society that makes vengeance the only rule, where death is punished with death, regardless of a person's intentions, is an authoritarian nightmare.