I can't really fault what AO has said here, so I'll just second it.
They used to call going to prison "paying your debt to society". In other words, you did your time, which somehow cleared your slate (at least to some extent), and you got out with a new suit and a $20 bill. The point was that a few years' hard labor clearing brush, building roads, etc. gave you time to think about it and realize your mistakes. The purpose seems to have been letting you rehabilitate yourself while you're inside and decide for yourself that crime is a bad career choice.
Nowadays, as AO said, it appears just to be considered as the cost of doing business, and just one more thing to resent society for.
I have to say, against an apparent attitude like that, I cease to care whether it's punishment or rehabilitation, as long as it keeps criminals away from honest citizens.