It's exactly like how kids get bullied and bring a gun to school. If you hit someone, don't cry about it when they hit you back because you aren't getting any sympathy. If you treat someone unfairly, is it out of line when they hit you below the belt?
There's this long standing myth going back to Columbine that school shooters are outcasts and weirdos and bully victims, but that was based on nothing. There's not really a school shooter "type".
They can be bullies, bullied, popular, outcasts, it doesn't really matter.