Guns opening on firing is a rare thing. Safeties being set on recoil is more common in my experience. Inertia is a powerful force. A good design takes it into account and deals with the mass of internal parts and their behavior under inertia.
Not rare in my experience. Its amazing how many Browning O/U sporting clays guns I've seen doing it, repeatedly. It seems a rubber band stretched around the grip, and hooked on each end to the tail of the top lever works pretty good until it's been rebolted. I can count 6 in recent memory.