This is how it works; the entire structure is a punishment system, however within it, if the offender is willing or required to do so, there are rehabilitation substructers.
Speaking from an Australian point of view i know that this is how it works here;
1. You go to prison for commiting your crime.
2. In prision you must work, and you can perform extra work for more money to buy tvs, cigarettes, food, etc.
3. If you have good behaviour you are rewarded, and promoted within your job, or given the opportunity to change jobs.
4. Once you have served a portion of your sentence with good behaviour then you may be transfered to a lower security prision, or a lower security section within your prison where you can take on more responsibilities. For example you may be transfered to a section that is more like apartments, which you share with a few other flat mates, rather than living in cells. Although, there still is a curfew to obey.
5. Eventually if you have good behaviour, have served a large portion of your sentence and have proved yourself able to live in near-society situations you may be granted parole, where you still have to report back to your parole officier, but you have realitive freedom, and interaction with society.
6. You have served your entire sentence or your reduced sentence (from good behaviour), you are completey free again.
So you see, if you want to rehabilitate then you serve less time, and generally have a better time and standard of living. If you dont want to rehabilitate, thats fine, prison is just a punishment then, but you will serve a longer sentence in harsher conditions.
IMO, this is the way it should be, and im glad i live in Australia where this is the case.
Once we have harsher punishment for parole violations and repeat sentences our justice system will be nice indeed.