There are always exceptions of course and probably all of us know of one or two. But people of strong faith rarely ever intentionally physically harm themselves or others.
I am not speaking of those who are obedient to the rules and regulations of any particular religion or just do church/synagogue/mosque, but those who have a connection with, a sense of relationship with, a higher power.
Children allowed to pray when something is tragic, sad, scary, disturbing--those to whom prayer is natural and comforting--will use a generic moment of silence for that. Not always but generally such children get through the uglies of youth with less trauma and are better able to deal with the really bad things in life as adults.
Children whose God is unwelcome in school or elsewhere in the public sphere, who are taught that being 'religious' is uncool and unsophisticated or unscientific, who do not have a supportive and affirming faith community, very often will not cope as well as children or as adults. And on average are far more likely to be destructive to themselves and/or others.
Would that have made a difference for your friend's son or your grandson? No way to know. Both may have been outliers and we cannot know what 'demons' drove them. I understand and appreciate what a tragedy such loss is for you and all others who have to endure that.
But I do believe allowing the genuine faith part of people's lives to be lived as openly and freely and visibly as they are allowed to live other factors of their lives would make a huge positive difference in the dysfunctional society we now all too often have.