system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How is code scrambled in a corrupt file on a computer? What causes the code to be deleted or moved?
gpt
Files can be corrupted in a lot of different ways. 

* the file transfer/ download was not finished and the file is not complete 

* there was an error in the packet stream of a download, or a man in the middle was playing with the packets

* a block on the hard drive / solid state drive where the data is located failed, and could not be recovered 

* a solar flare caused a higher level of magnetic radiation to reach the earth, and was not stopped by the magneto sphere, the magnetic radiation causes some bits to flip. (yes this happens but the bits are always recovered so you never see any data get compromised because of this.)