I'm only surprised that soembody didn't do this sooner. Simply being a prominent and controversial figure in the US is sufficient to make a person a target. The reasons for taking pot-shots at such people are rarely rational, and the single irrational individual is the one thing organised security is never ready for..
The Secret Service probably looked at that rooftop with the eyes of trained professionals used to using high-quality weapons and thought "Nah. Nobody would try that." But some youngster used to playing Assassins' Creed or Hitman would see it as ideal.
As to the whys and wherefores, once religion stopped being able to control the population with the promise of Heaven and the threat of Hell, another method was needed. The current one is to give anyone who feels alienated, let down, ignored or oppressed somebody to blame. Doesn't matter who, as long as the blame is not directed at those in charge. Clearly young Mr Crooks blamed Mr Trump for whatever was wrong in his life, and set out to improve matters in what is, regrettably, a traditional American manner -by shooting him.