Yeah, the Mario trilogy had a whole lot of codes that would do a lot of weird stuff. Graphic changes, music changes, etc. Some of them would make the game less playable like the SMB2 suicide code, but they were fun to watch.
I used to like using the "debug" code for SMB3 (SLXPLOV IIRC), which accessed what seemed to be a testing function that was left in but normally inaccessible. You could change powerups at will with the select button, and you could also access a gray version of each powerup as well. This version didn't take normal damage, but you couldn't enter pipes while it was active. It was likely designed simply for testing the specific abilities.
I could plug that code in plus two of the official codes (infinite lives and Mario could infinitely use items in his storage space; Luigi couldn't) and pretty much be god.