They ask the inmates to play roles, most of the times it's to scare the kids that are becoming troubles for their parents. These inmates are old criminals that the cops take back to show what the kids have to live with if they don't turn their life around...these inmates were kids too they were showing tough love for this kid by being rough with him to show him that this is what other people do in jail.
It's a program called "scared straight programs". It's becoming more and more popular in the US.