The comments here are WAY WAY off.
Against popular belief shooters are neither bullied nor are they from broken homes.
Most of them have a antisocial personality disorder come from middleclass homes that are not very involved and they are male without friends. If you are interested in the stats of it all please read up on it, it is interresting but they don't really explain why there are more shooters in the us than elsewhere, we all have narcissists and uninvolved parents.
I think it is very likely that the culture plays a bigger role than the access to guns. The US shitty gun laws are a symptom of a shitty culture towards violence as a whole. You have this glorification of the individualistic male violent archetype with guns, may it be the military, media or real life people and people with certain mental disorders will latch unto that and internalize this as powerful. (videogames STILL don't cause real life violence i am talking about the lived culture not media as the scapegoat)
My guess is they feel towards their victims like normal people feel towards inanimate objects who fail them. We don't function like they want us to or better they didn't get what they feel like they DESERVE from us and since they are the individualistic, strong main character, we deserve whats coming.
I strongly believe its a mix of specific mental disorders and toxic cultures with a bad understanding of mental health.