Collapsed while it was sitting at a gate, with no passengers yet on board - meaning the the gear was under far lower loads than during a landing.
While slowly-failing gear could have collapsed anyway just then, the obvious question is whether the nose gear had just been serviced. By mechanics who (say) forgot to re-install the bolts holding everything together.