I sure would be interested to find what's doing this. I know that a person isn't redefining the TAB key, so I would like to find out what causes this.
Redefining tab is one the easiest things to (accidently) do; it only takes four key presses: [TAB], [Enter], [Enter], [ESC] (and then [ESC], [ESC] to finalize it.)
One way to protect against this is delete cfg/default.cfg, start any game in mame, exit mame, and then make the just created cfg/default.cfg read-only.