My understanding of prison is that, despite much talk about rehabilitation, it essentially serves the function of exile. When a person breaks the rules of the society, society forces em to leave. These days, just about all land belongs to one society or its neighbors, and it's bad form for one society to send its criminals to a neighboring society. Instead of exile, then, societies lock people up to keep them away from everything. People form a society and set up rules, so a person who violates those rules gives up eir position in the society and the right to participate freely in it, i.e. the right not to be imprisoned.
Putting all the (convicted) criminals together in one place, given the understanding that most of them will rejoin society at some point, is a pretty bad method of actually reducing crime. The typical prison environment is one which delays or even reverses an inmate's apparent moral development (see e.g. this study by Peter Scharf, a student of Lawrence Kohlberg), so likely it will actually make things worse. This has been demonstrated in studies (like this one), which showed recidivism at over 60% and rising in the U.S.
I do think that people are trying to be fair in a Rawlsian sense, in that they're acting to enforce the social contract and punish violations, i.e. crimes. Unfortunately, the typical prison environment is structured based on a very naive and shallow sense of justice and fairness. A person generally doesn't decide to commit a crime spontaneously; there are a large variety of external factors, as well as the uncontrollable internal factors you describe. It's fairly straightforward to apply Rawls' veil of ignorance and realize that "you" (i.e. the arbitrary individual you could be) would not want to be an inmate in our current prison system, and the likelihood of that as things are today is fairly high (one of every 100 U.S. adults is in prison). Couple that with negative empirical results as described above, and it becomes apparent that the failure is not one of Rawlsian justice in principle, but one of its implementation by those who aren't thoroughly considering the issue. (They might simply be following convention, or they might be more concerned with appearances.)
I agree with the "prison as exile" view. (Transportation was an interesting historical institution somewhere between the two.) However, I don't see the logic behind the Rawlsian argument. Yes, of course that behind the veil of ignorance you wouldn't like to be among the 1% who are in prisons, but significantly reducing that number may well be feasible only at the cost of making the lives of the remaining 99% much worse on average. Now, maybe you believe that this is not the case, but that requires a separate argument, and it certainly can't be as...
Why do those words go together?
Society - and for once, I'm using this term universally - teaches that, if you committed a crime, you should be punished.
But in some societies, we have an insanity defense. If you had a brain condition so that you had no - here it's a little vague - consciousness, or moral sense, or free will, or, well, something - then it would be cruel to punish you for your crime. Instead of going to prison, you should be placed somewhere where you can't hurt anybody, where professional physicians and counselors can study your case and try to reform you so that you can rejoin society.
Wait - so that isn't what prison is for?
No. Prison is to punish people. Is it any wonder that prison doesn't reform people, when we don't want it to reform them? Most people would be upset if prisoners could go in on Friday, and emerge, rehabilitated, on Sunday. When people say, "It would be cruel to punish people who aren't responsible for their actions", they are implicitly saying, "Prison is necessarily cruel; and that's good, because we should be cruel to criminals who are responsible for their actions."
But the more we learn about psychology and neuroscience, the further responsibility recedes into the distance.
Outcome-based justice argues that we should give up playing the blame game, because neuroscience keeps finding more and more proofs that things are "not our fault". Instead, we should write laws that deter crime.
You might think this is what we already try to do. But it isn't! Witness this confused article from the Brookings Institute, Cognitive Neuroscience and the Future of Punishment by O. Carter Snead. Snead objects to outcome-based justice. He summarized all of the arguments for it, yet managed to completely miss their point, concluding where he started from, saying that outcome-based justice is obviously bad because it could lead to being cruel to people who didn't deserve it. (Instead of only being cruel to the people who do deserve it, which is obviously what we want to do.)
Snead understands that outcome-based justice deters crime:
You might expect that Snead goes on to explain why these laws are bad things. But he doesn't! He assumes we can all see that these are obviously bad things.
The Wrath of Kahneman describes a study which asked whether people punish others in order to deter crime, and concluded, No. People are doing something else.
One theory is that people are trying to be fair. Everyone should get the same chances; everyone should get the same punishment for the same crime. John Rawls argues this explicitly in Justice as Fairness: Justice should not be utilitarian, but should instead be fair.
I believe Rawls' view is also the popular view of what "justice" means. And, I will argue in a later post, it is part of a pattern showing a deep divide between two different ways of using the word "ethics".
ADDED: Constant made the point that, while one part of outcome-based justice is preventing future harm from the criminal on the dock, another part is deterring harm by other criminals. This latter part does not benefit from punishing criminals who cannot be deterred. Thus, to optimally punish both criminals who can and cannot be deterred, the law requires a concept of moral culpability, and should punish criminals who can't be deterred more lightly. This is a better origin story for the linking together of morality and free will than the just-so story I'd come up with, so I plan on stealing it for my next post. (SilasBarta may have been trying to make the same point, but I found his comments impenetrable.)
(This post is laying groundwork for two other posts that will go in different directions, neither of which concerns justice.)