My 2 cents.
The deed is very irrational indeed. But desperation and depression/fear/madness can become a dangerous cocktail when (wrong) ideas (propaganda) are added, to fuel hate and "revenge". And although the Syrian might have been too ill to sense anything, the deed could be seen as a severely egoistic one, as well. "Okay, if I can't live here, some of you cannot either".
Naturally, there have been people like Breivik, who were not mentally ill (as crazy as that sounds), but who had terrible ideas and were full of hate. Depending on the amount of indoctrination, lies and hate can be enough to do all this. And therefore, hateseeding should always be combatted.
When Trump comes to power, I'm afraid the world will see many more terrorists, convinced of crazy ideas. More dangerous people, both Trump supporters and people who hate Trump's guts (and his supporters).