The boys have nothing to do except see a useless psychiatrist and go to church. So the devil makes work for their idle hands. The results of this are not very pleasant to see, and if for example you couldn't take Alan Clarke's Scum (which this is based on), don't go and see it.
I think the film is quite knowing, it recognises for example that psychological pain is just as bad if not more so than the physical version, and even with violence its the psychological context that tends to be the most painful ingredient. Physical pain aside from maiming doesn't last long in the mind, being made small however can last a lifetime. This isn't a reality that the system recognises, and when a group of boys set out to quite literally blow the mind of another boy, it is the victim who is punished when he explodes and has to cope with solitary. Kind of a game.
The authorities aren't all that good at keeping the vulnerable and the aggressive teenagers apart. I think the bullying as well is very realistic. For example a kid who is initially bullied for fun, later becomes bullied because his broken state and weakness is so despicable. It has often been said that public school (dorms and studies) prepare one well for prison life, and actually I was very much reminded of school study experiences watching this movie. I even knew a kid who was tweaking in the way the really dangerous inmates did here, kind of had a permanent testosterone imbalance I presume.
Another thing that the kids know, is that they are write-offs. So what is there left for them to do except extremely nasty things to each other.
Very hard to watch, but raises important points about the purpose of incarceration.