When a file is uploaded to the site, it gets assigned a unique ID number. When the site wants to display the content, it uses that ID number to reference it. The bug ended up generating new unique IDs for everything on the site, so any references to the old IDs end up returning nothing, because no files have that ID anymore.
Imagine if the entire population of a town were all assigned new names. Nobody would get hurt, but phone books would be useless.
External files are safe because they exist outside of the ID system. Download preview pictures also appear to be intact, so I imagine that they're associated directly with a download page rather than being stored as a separate asset.