I wonder if the "cheats" of selecting and de-selecting commands to raise levels were left in on purpose. Perhaps the game designers knew that leveling by directly fighting monsters is a major pain in the ass and threw in an easter egg to reward those that paid close attention to their stats and figured it out.
I also think it's possible that they commented out some piece of code that prevents this trick from happening so then their testers were playing various scenarios in the game they wouldn't have to waste time in inane battles just to see their sword level raise. The only problem is that they forgot to uncomment it and now we all get to enjoy it. Silly Nasir.