Inhimwelive,
Since it held, I would look at the Action Slide Spring. Below is a photo of one from Numrich. To get to the spring, you have to remove the action slide/forearm from the magazine tube. The spring is on the outside of the magazine tube, and is hidden underneath the action slide.
I would look for the spring to be compressed over age, or maybe stuck with rust, etc., so it can't push against the inside of the action slide/forearm.
A lot has to do with how one holds a shotgun like the 500, as if you do not pull backward on the forearm, while holding the gun against your shoulder, and the action slide spring does not push back the action slide, the gun can fly open when firing, as there is no pressure to cause friction between the bolt slide, and the action lock lever (lock button). Some shoot by just resting the forearm in their hand, but put no rearward pressure on it, so they added the spring to compensate for that missing pressure.
If the action slide spring is pushing back, as it should, and the breech opens, then the action lock lever, or the bolt slide is worn, and would need replacing. Under no circumstances, should the action lock levers button go up on its own, as if one had pressed it, by just dry firing, and letting the hammer fall. After letting the hammer fall, one should have to slightly pull forward on the forearm, first, for the button to go up, and allow the breech to unlock.
Copyright Numrich Gun Parts Corp.