One thing I can say for sure is this: whether we're talking about random drive-by shootings in urban America or massacres carried out by teenagers in Oregon or Colorado tired of being bullied and excluded, or massacres carried out by rightwingers in South Carolina or Norway, or leftwingers avenging the deaths of Sacco and Vanzetti, or Islamists in New York or Paris or Brussels or Israeli settlers in Hebron or Palestinians from Jenin or US soldiers in Haditha or self-loathing homophobes in Orlando, there is a common thread here, aside from the obvious access to firearms or explosives or whatever:
A tiny minority of people in the world who are suffering for one reason or another will be compelled to make other people suffer, and will act on that compulsion.
This is actually a fact, and has been extensively studied by think tanks. Politicians and media outlets talking of "senseless acts" and "evil" and "mental illness" and "lone wolves" and "home-grown jihadis" are ignoring the overwhelming evidence in order to serve an agenda which does not actually seek an end to these acts.
On the contrary, to serve their agenda, whether we're talking about "safety through gun ownership" a la the NRA, "safety through the security state" a la the NSA, FBI, and militarized police departments, or "safety through prosecuting the war on terror" a la the US, British, French, Egyptian, Israeli or Russian war machines, what they need most of all are many more such massacres.
And, unfortunately, as long as the root causes of the suffering continue to be exacerbated by all of the aforementioned institutions throughout the world, the massacres will continue. The next attack is coming.