If these attacks got less free distribution, they might be less likely to occur. Part of the incentive around horrific attacks like this is to get free marketing (aka, earned media) for a cause (as the killer makes clear in his manifesto).
And to add some data, here's my analysis of Islamic terrorism vs. homicide coverage in the NY Times (as you can imagine, the scarier or more horrific the attack, the more distribution it gets in the press):
https://www.nemil.com/s/part2-terrorism.html
And comparison of every death type by coverage: