Of course there are other issues at play too. For instance, a prison can't be too nice, lest it turns into a free vocational school and people will find committing crimes and getting caught to be an excellent way to get education. Or another example - you can't really make prisoners do useful work for the society (as opposed to just rotting in their cells), because it disrupts the market economy and becomes a powerful force for administrators to threaten their local communities ("do X, or else I unleash my 300+ strong force of unpaid workers and drive you out of market").
The more I think about prisons, the more I see it's a very convoluted issue, and there isn't any obvious, simple solution.