From the Associated Press, as reported in the Boston Globe:
Motive is unclear in school attack as grief engulfs Texas town
By ACACIA CORONADO and JIM VERTUNO The Associated Press, Updated May 26, 2022, 12:01 a.m.
Actually the motive for many of these incidents is quite clear: a loser is inspired by the fame accorded to a previous loser by the media when they report said loser's name.
"I'm a complete failure, a nobody. But TV and newspapers have shown me how I can leave this life in a blaze of international fame! All it takes is an AK47 and a trip to a local school and my name will be all over the news!"
Media folks, why do you keep pretending to be unaware of your role in these tragedies?
Stop reporting the perpetrators' names.
Yes, that will mean fewer audience-generating incidents to report.
Live with it.