The prisons I see do good work? Boot camps, work camps
As vaskidmark said, their actual success rate is much worse than what most perceive, and there's an unfortunate history of abuse entering the realm of torture, including death.
Besides, selection bias. One of the first things I assume is that different criminals will respond best to different treatments. Ergo the 'assessment' part when they are first introduced to the system. Do they need education? Do they need anti-gang treatments? Do they need to be taught practical skills? Do they really need psychological support/drugs*? Do we need to work on building ethics into them?
edit: Boot camps should work well for certain types of inmates, not all.
Also, reading about your time you would have been in jail, not prison, correct? A very limited amount of time to do things there. With a prison you're supposed to have at least a year to work on them, so I was concentrating on that side of the institution. As I understand it the equation tends to flip in prison - jobs are highly sought after.
But yes, prisoners, of whatever duration, should be encouraged to work. The issue becomes complicated for those accused but not convicted, held in lieu of bond.
*A lot of our prisoners are 'actually' clinically mentally ill, not just some vague 'born out of mental illness' thing like I said earlier.