I think, in practice, "justice" has always been a mediated form of vengeance. The state maintains its monopoly on violence by extracting enough vengeance from criminals that individuals (i.e. victims or their families) are willing to subcontract revenge to the state. In other words, the "justice" system has to provide enough vengeance to retain the consent of the victims, or those offended on their behalf. The benefits to society are large; total violence is much lower once it's able to break the cycles of private retaliation and avoid endless bloodfeuds. But it is an uncomfortably pragmatic equation.
I don't think there's any other consistent way to look at the issue though. Treating murder as the ultimate crime, as almost all justice systems do, makes sense in terms of the cost to the victim and the desire of societies as a whole to see murderers punished. But most murders are unplanned, and most murderers are no more likely to murder again than any other member of the population. Given the above, long sentences for (unpremeditated) murder just do not make sense; they probably have little value either as deterrence or prevention, and they certainly don't rehabilitate. But would a victim's associates stand idly by if their murderer was free after five years?
This is the crux of it. It's not some fundamental human value to want harsh vengeance doled out for crimes. It's peculiar to the US and a few other countries.