In jail a man has no personality. He is a minor disposal problem and a few entries on reports. Nobody cares who loves or hates him, what he looks like, what he did with his life. Nobody reacts to him unless he gives trouble. Nobody abuses him. All that is asked of him is that he go quietly to the right cell and remain quiet when he gets there. There is nothing to fight against, nothing to be mad at. The jailers are quiet men without animosity or sadism.
If you treat prisoners well, they will be less angry, less inclined to violence inside prison, less likely to provoke violent actions by guards, less likely to have reason to file brutality lawsuits that cost taxpayers a bundle and waste administrators' time. And most important, well-treated prisoners will be less likely to leave prison angrier, more vicious and more inclined to criminal behavior than when they went in.
The idea that the sole aim of punishment is to prevent crime is obviously grounded upon the theory that crime can be prevented, which is almost as dubious as the notion that poverty can be prevented.
Whatever is worthy to be loved for anything is worthy of preservation. A wise and dispassionate legislator, if any such should ever arise among men, will not condemn to death him who has done or is likely to do more service than injury to society. Blocks and gibbets are the nearest objects with legislators, and their business is never with hopes or with virtues.