Before our morality fully develops, we picture prison as a place where bad people go to be punished. We don't want prison to be a comfortable or nice place, because it's for bad people. A lot of people never really grow out of that mental image.
The problem with prison, to me, is that criminals are a drain on society whether they're in prison or out. Economically, the best result of prison sentences should be rehabilitation - turning criminals into non-criminals. That doesn't happen automatically, and it doesn't work on everyone, but it should definitely be the goal. Otherwise, we're losing to criminal enterprises on the outside, or we're paying a large amount to keep criminals locked up. If we can, instead, vastly reduce the rate of reoffences, we'll start seeing some economic benefit. It will take a lot of time for society to change its collective mind about criminals, but if we can view prison as more of a hospital for criminal minds, rather than a dark pit we put people we'd rather not deal with, that will be a start.
Mokalus of Borg
PS - There are probably fewer criminals unable to be rehabilitated than you think.
PPS - Or I'm a naive optimist.