Basic precautions were clearly ignored.
I was trained by the RAF in the use of firearms and have had occasion to put that training to use.
Lesson one: Make sure it is not loaded.
Lesson two: Double check that it is not loaded.
Lesson three: Cock the weapon and fire it into the ground, just to be sure there is nothing "up the spout" ~ If it goes "BANG!" hand the weapon to the armourer and march yourself to the guardroom for a week's stay.
I had a similar experience, had to collect ejected rounds and account for all expended rounds in a range declaration at the end of every session.
Even in ?civvies street? clubs, members were always taught / reminded.
1: Always assume the weapon is loaded
See also: One and two above
2: Always keep it pointing down the range
3: If it jams place it on the table pointing down the range and call over the range master / armourer
This was hammered in to everyone from day one.
What happens is they listen, but are far too excited to take it all in.
Then came the day we all hit the deck in double quick time, when some wally swung around, having fired just one round, saying "Oh it's jammed, what do I do now?" whilst waving it in every direction except down the range.

He found himself excluded from the site thereafter and sulked for a long time.