In addition to the problem of wide-spread untreated mental illness, many public schools are much like prisons for kids who have trouble adapting to social norms, both in that they do not grant basic human rights and that inter-student relations are barbaric. I don't know whether the shooter was a student or not, but based on my experience, it is not difficult for me to imagine somebody with less self control acting out in a violent manner.
Sorry for your loss.