I duckduckgo'ed "nose gear collapse" earlier and it seems it may be an issue that's more common than expected? At least there were lots of images of airplanes with broken front wheels and the nose touching the floor.
From the picture and the text this aircraft was parked at the gate. During a hard landing the nose gear may collapse but not while being parked. And while parked there are protections to prevent retraction. However, these can be overridden by maintenance.