So a plane which has withstood probably countless landings, had its nose gear collapse while sitting statically at a gate of all times and places? Weird.
There's a story that during the testing of a fighter plane - I think the F-35 but not sure - the "developers" claimed the new computer systems made most pilot errors all but impossible.
QA engineer's first check was, what happens if I try and retract the wheels while the plane is sitting on the ground and not moving. Oops.
There are plenty of older planes with "retract wheels automatically when airborne" buttons that work by detecting a reduction in pressure on the wheels. There are also plenty of runways with slight bumps in them. The two do not work well together.
Each time has been on different aircraft models, but there's not a lot of variation in nose wheel retraction design on airliners. There's a myriad of ways something could go wrong to make it happen, but considering how many flights there are per day, it's still an extremely rare event.
QA engineer's first check was, what happens if I try and retract the wheels while the plane is sitting on the ground and not moving. Oops.