You're almost right.
The actual explanation is that they're all fictional characters in a Harry Potter fanfic. Dumbledore knows this, or at least knows they're in a story. The purpose is indeed to make a good story, and one that teaches Methods of Rationality.
What it doesn't explain - why cheat codes are in latinised English.
Because it's a Harry Potter fanfic, and in the original Harry Potter series, the spells were in Latinized English, probably because Latin has an ancient mystical aura for readers in fantasy tradition.
Oh Blueberry, you so Doylist!
(The HPMOR discussion thread after this one is here.)
This is a new thread to discuss Eliezer Yudkowsky's Harry Potter and the Methods of Rationality and anything related to it. There haven't been any chapters recently, but it looks like there are a bunch in the pipeline and the old thread is nearing 700 comments. The latest chapter as of 7th March 2012 is Ch. 77.
There is now a site dedicated to the story at hpmor.com, which is now the place to go to find the authors notes and all sorts of other goodies. AdeleneDawner has kept an archive of Author's Notes.
The first 5 discussion threads are on the main page under the harry_potter tag. Threads 6 and on (including this one) are in the discussion section using its separate tag system. Also: one, two, three, four, five, six, seven, eight, nine.
As a reminder, it's often useful to start your comment by indicating which chapter you are commenting on.
Spoiler Warning: this thread is full of spoilers. With few exceptions, spoilers for MOR and canon are fair game to post, without warning or rot13. More specifically: