My best guess is that the chain wasn't installed correctly to begin with. Exactly how is anyone's guess. It's possible to miss half of the connection on some brands of quick links, though. The chain would look pretty close to normal unless you were really looking for that issue.
bike wrench
A place to ask bicycle repair questions, and for bike shop monkeys to share advanced non commercial wrenching resources (no YouTube self promotion). This is only for repair related topics.
I snapped a new one trying to pop it into the locked position before. Now I just align the pieces together and on the upper of the loop it and step on the pedal while breaking. Other than that I've never had them break or fall apart if they were opened and closed less than 8 times even if they are non-reusable.
Opening them is just cursed though. I need a tool with like 1 meter arms
This is a random guess: if the chain fell off while shifting, then the sideways forces of the derailleur acting upon the replaceable link could have dislodged the pins. But if the link was secured on both its faces, this shouldn't be possible. So instead, it could have been that one link face wasn't secured, and by sheer luck, the replaceable link never happened to 1) be at the derailleur while 2) shifting gear ratios.