So...according to the article, the boys had been teased, 'tortured', bullied, yadda yadda, for their entire lives by other kids in the school. Then they wrote a story to present to their drama class in which there are scenes of death of members of the staff and other students (the article is totally vague on what may have been contained, so for all any of us know the damn thing specifically said "on January 15 we're going to kill you all".
I certainly think that SOMETHING needed to be done for a student to be stupid enough to present something like that if they were the victims of that type of behavior from other students. What kind of kid goes nuts and takes a gun to school and opens up on a class? The kind that were teased, bullied, etc. and didn't have many friends, which the article makes these two appear to be.
Arresting them may not have been the RIGHT thing, but when you have to worry that they've been planning an attack for some time and may have the guns and bombs in their bedroom right now, it may have seemed like the best idea at the time.