>When does punishment become torture?

>When does punishment become torture?

I was sitting on the train this morning and across from me was a man having a very vocal argument on the phone. This man had only a month ago been released from prison after serving an 18 year sentence for what I gather was a drug related crime. I should point out that at this point the man was shouting into his phone.
His issue was with the fact that he was not receiving the support he needed from the other man on the phone. 
This man had been in prison, removed from the world for 18 years and by his own admission was having trouble adapting to mainstream life again. He described the experience of riding the train as foreign to him.
He talked about having trouble finding a job, and finding a place to live. He was asking for help but to his obvious frustration was receiving none. This man according to a judge has served his dept to society. He has paid for his crime. The catch cry now for dealing with crime is rehabilitation. It is a philosophy though that does not seem to fit with the reality. We lock people away, we change seats on the train, we cross the road, we don’t want them as neighbours.  He will experience this for the rest of his life. As a species we seem to revel in punishing or penalising those who we deem to be wrong, inferior or different.
Now I have to admit that what I heard was only a tiny part of the story and my impression of this man is based on only a very small snap shot of who he is but it made me think about the way we deal with those people we see as “criminals”.
At what point does the punishment become torture. 
If this man is not helped he will by his own admission return to crime and if he does will we be honest enough to admit that we failed him or will we blame him for his own choices.
Some crimes are unforgivable but as a society should we not be judged how how we treat those of us in need?