Your OS, all installed softwares, and all data are stored on a hard drive that is composed of many thin disks covered both-sides with a magnetic film. The magnetic film is made of minute magnetic particles (microscopic iron rods say) that microscopically can move - - say point North, or Point East.
Minature magnetic heads immediately adjacent to these coated disks embed a magnetic field into the little iron-rods to make them point in the direction wanted. Pointing North is a ONE, pointing East is a Zero, say.
But making a iron-rod point one way, and then keeping it so-pointed over night is not fool-proof. As indicated above, a burst of a stray magnetic field (from Speakers, Fans, Xeon lights) may disturb the rod alignment. Or it may just be a weak iron-rod that will not hold its alignment. The disk coating may be flawed.
A hard drive has tons of errors on it each and every day. There is no way to keep all those billions of billions of little iron-rods to stay put. Some are always going to be pointing where they are not suppose to be pointing. So, the hard drive incorporates error corrections, placed every so often on the disk, which are used to compensate for these pointing errors. But, only so many error corrections can be handled in each sector. You may have had an over-ride.
Or alternately, the OS may have had a hiccup while you wee running, though you did not notice it. The OS may have never really finished the job of properly laying down the file onto the HD magnetic disk medium