How could justice be the same, now we can afford and administrate prisons, as it was when they weren't an option?
The UK penal code -for those who couldn't buy their way past it, & pay for imprisonment- became known as The Bloody Code, because it was basically death for every serious crime. Hence the phrase 'You might as well be hung for a sheep as a lamb'. The unwillingness of juries to convict people of stealing food when they were starving, forced the provision of better poor-laws, and eventually justice reform.
The Roman concept of justice was a series of literal trials. We usually think tortures, but in practice they were basically only for people the court was sure were guilty and would not confess, and those who pleaded guilty generally would not face full penalties (eg exile not death).
The bible prescribed the death penalty for extremely minor seeming crimes, like blasphemy, sabbath breaking, or being a foreigner that gets too close to the tabernacle.
The social worlds of these eras was incredibly different from our own, and from each other. People demand 'something be done' to recognise a crime, and when prison wasn't a workable concept (it evolved from jail, holding for trial), that meant things like mutilation, facial branding, or public shaming like the stocks - which we would find unacceptable now.
So I would argue this is not just about changes in jurisprudence, but the instincts behind that, our culture of what we feel is just and fair, because that was about what was necessary to maintain social order, to sustain the collaborative organism of a city, people, or empire.
We talked about an edge-case for consequentialist theories of justice here: Is artificially generating images of minors in sexual positions unethical? And I made the case that social unrest or threat of it, is a major driver of jurisprudence. It is how hard lines about what is socially acceptable, get driven into statute. The Baron's Rebellion against King John that got the Magna Carta signed is another example - and as above, it's provisions of habeus corpus and jury trials ended up having lasting impacts on treatment of the poor. Consequences of the lines society draws, how they enter statute, is crucial. This is the mark of culture, evolving, developing, not born from a process of sterile reason alone.
An old aphorism though, says 'Hard cases make bad laws'. The actual attainment of ceasing the causes of outrages, must be checked against hasty action to secure only the appearance of that, in the moment of outrage. The non-logical non-rational side of this can be understood from this almost uniquely human behaviour: How do ethicists tackle the question "Is it immoral to have sex in public places?" Is it possible to use rational and empirical ideas to answer? In doing justice, "A man can do as he wills, but not will as he wills." We can reason out why we have a taboo against sex in public, but the enaction of the taboo arises from outrage, a non-rational process (assuming among adults is a given premise). We have instincts for making societies work, which we have to reconcile with reason. But our oughts cannot derive from what is alone.
I would argue justice, fairness, morality, all evolve. They don't change radically, with discontinuity, but in dialogue, one age to another, one generation to the next. James C Scott's use of the term metis, and the idea of intergenerational legibility, are very interesting on this.
Marital rape was only made a crime in the UK in the early 1990s, illustrating how something now unconscionable was considered totally acceptable in the past. Justice depends on culture, and it never stands still.