The crew would take the guns and go shoot cans and such during down time on the set. It sounds like someone didn’t bother to unload the gun, or verify that it was unloaded after that.
What could go wrong, and the crew on Ford v Ferrari would take the cars out on the track and race at 200+ mph for fun I'm sure.