The cause of these instances is one of two things...
1) Untreated mental illness
2) Piss poor family structure or lack of proper parental control beginning when the child was young.
Add to your great list
Personal grudge or societal grievance they have to take out on others....
I would add that they are also inflamed by social/main stream media. All of the posts on Twitter, Facebook, Reddit, all of the pundits. It is a constant stream that gets people worked up.
These mentally ill young people need to be sequestered and have those information streams cut off. Particularly when they are being medicated or the medication is being modified.
Institutionalization needs to make a comeback.