I actually think the media and the public's reaction to these incidents has something to do with it, too. The amount of attention these shooters get is crazy. I mean, look at Elliot Rodger: how much do we all know about him now? I didn't even go out of my way to look into the story and I already know more about him than I do about my own neighbors. I think the attention gives lonely, insecure kids/young adults reason to think they'll get the reward of some sort of fame.
Obviously that is not the whole problem but I do think it plants ideas in already unstable minds.
I don't really think it's any one particular thing that results in these situations, it probably takes a bit of a 'perfect storm'. Access to guns, mental illness gone unchecked, unsupportive (or unaware) family, motivation, age... it all likely comes together to create a person who thinks doing something drastic is the best (or only) option. The shooters are largely high school and university age, so schools become a familiar and easy platform.