And other similar events involving someone shooting random people
Mainly because it's a more violent society. The revolver was in common use already around 1850 and the browning around 1900. At that time most European countries had no gun laws at all or very liberal ones. Yet there were no school shootings in Europe at that time. The overall crime rate was also lower in Europe at that time, although most people were very poor.
There has however been massacres in Europe
after the implementation of draconic gun laws and the nanny state, which very much indicates that guns aren't the (main) problem. Something is very wrong with society both in America and Europe, but it has very little or nothing to do with the guns themselves.