well i mean, soda raises an interesting point. the guy had no criminal history, and nothing on his background to prevent him from buying a weapon. the only thing that could have possibly stopped a seller from selling is if there was a mental health mark on the background.
so mental health - how do you treat crazy assholes out in the world? you can't force treatment on them, unless they do something really violent and a court has them institutionalized. you could have more voluntary sources - mental health clinics i guess. or phone numbers to call similar to suicide hotlines. but again, it's not a crime to be kind of a crazy asshole. if it was, half the people i know would be in institutions.
only thing i see is culturally we push people towards craziness. a lot of people can't handle feelings of shame, failure, desperation, loneliness, etc. i have no doubt our selfish, ego driven culture of social media and entertainment is making us nuttier. but in terms of having the infrastructure to stop a guy like this from doing what he did - i'm open to any suggestion on how you stop that with mental health treatment that he'd actually get or gun regulations.
or maybe some people are just fuckin cracked and blindside the world one day.