Not sure why this was downvoted, but I support your question.
As modernists, we believe that it's important to punish the person who is responsible for a crime. It is not clear that is
1/ "Justice",
2/ shared by our ancestors,
3/ any more clear or moral than other belief systems.
It boils down to the purpose of the modern justice system. I've heard all the following reasons, each with deficiencies:
1) because doing wrong must be met with punishment (tautology)
2) because it keeps dangerous people off the street (not structurally optimized for)
3) because it makes our society safer (abstract/generic)
4) because it makes it clear that each individual is responsible for their actions (most believable to me)
I guess my question is this: why do we put people in jail (or kill them)? Personally, I don't think our justice system exists to make "good society" safer[0]; I think it's to control people so they behave in the same way those in charge want people to behave. (I.e., the initial motivation is amoral.)
[0] if so, victimless crimes wouldn't be so heavily regulated
Perhaps divine retribution is a better explanation than ritual sacrifice in theocratic regimes, in the case that a god or a group of gods require the death of the mortal body so the soul can face metaphysical justice for Earthly sin.
However, regardless of the metaphysical beliefs of a state, any entity of sufficient size & organization will often be recognized by an individual as possibly having godlike power over the individual's body. Whether or not that truth actually ritualizes state-sanctioned violence, or the diffused psychological impact of that violence can be called a sacrifice, is a matter of opinion; however, being that it is state-sanctioned it is obviously distinct from murder, and because these punishments often have no deterrent effect on the populace, their true nature is in camera obscura.