Why did "Failed to write blend file" happen in 2.79?

I know this bug has been fixed already, but I remember in the old days of 2.79 and below, if you tested the GE many times with P, you would eventually have an effect when almost half your sounds (if you placed any) were gone if they were set to play the instant the GE started. Sounds that played after the GE was started (for example a simple toggleable sound effect) still played.

However, if you tried to save over the affected file, Blender was unable to write to said file, and the file would vanish due to the bug. Exiting made Blender say that Blender was unable to save the quit.blend file (used for recovering from crashes), and to “check for permissions”.

These errors were later changed to “Too many open files”, and “Too many open files for writing”, which suggests some sort of memory leak within the old GE. These errors were a hassle to deal with, and meant progress was usually unrecoverable if you tried to save, unless you had a .blend1 or .blend2 in your computer.

Back to why I wanted to ask this question: Why was 2.79 and lower doing this after lets say, 7, 10 12 uses of the GE? This was quite annoying and I’m glad it was fixed.