I had this happen once to my Platinum version. My game had unusually large amounts of game-freezing glitches/crashes (when it did, mostly when leaving PKMN Centers and booting up), and one day I started playing it, it froze three times trying to boot up, and the fourth time it erased everything. I won't ever know for sure why.
I also had this happen to my Diamond version after I lost it for 2-3 years and I found it and wanted to start playing it again. Except it died immediately. :/ I'm pretty sure this one was my fault though.
Funny thing, I bought a new EOT game and when I booted it up for the first time, there was quite apparently a file already there and it had been started. It had been corrupted when I started playing it the first time. Weird, eh?
Bottom line is, Sometimes they make faulty games that don't work as good as they wished.