Old school games were filled to the brim with secrets. While a lot of newer games allow you to unlock content by paying for it from the cash shop, titles from the 16-bit era had various types of secrets that could be unlocked by performing odd button combinations, or, in the case of Sonic 3D Blast, punching Sonic in the face. So why did a level select pop up when it happened? Because punching the cartridge would cause a crash error, and all crash errors were designed to reroute players to the level select screen.
In a quick retrospective by TT Games' founder, Jon Burton, via his Youtube channel GameHut, the designer went back and explained why punching Sonic, or rocking the cart while it was active inside the Sega Genesis, would open up a hidden level select screen. The reason was because that's how he designed it.
More specifically, it was a workaround for collating interrupt errors that would cause the game to crash. Instead of crashing and getting stuck in a loop or the system freezing, Burton had Sonic 3D Blast take the player to a level select screen. This was an easy way to identify that a game-breaking error had occurred, and also allowed the team to bypass certification from Sega, since, technically, the game still functioned even though it was actually crashing.
Over the years gamers discovered by that by rocking the cart, wiggling it, tapping it, or lightly punching it, Sonic 3D Blast would take gamers to the level select screen. This wasn't designed as an actual cheat code, but rather was a contingency to identify when the game was crashing.
According to Burton it was likely that with the game cartridge losing connection with the Genesis board it was sending I/O errors through the interpreter. However, instead of going through a debug crash screen, the crash handler would warp players to the level select screen.
It's an ingenious way to get around game crashes, really. Because, ultimately, how would the certification board even know that the game is crashing? They wouldn't! That's the beauty of it all. Even now we're only just finding out that the crash screen in games like Mickey Mania or Sonic 3D Blast were put into place to compensate for manually having to sift through code during a crash in order to find out what caused the crash. Burton even lists a few examples of specific interpreters that would trigger the screen, as indicated in the video below.
Back in the day these techniques were used to bypass some of the roadblocks that would prevent games from getting put onto store shelves in a timely manner. These days a lot of AAA games will launch broken right out of the box, such as Assassin's Creed Unity or Halo: The Master Chief Collection, and then the developers proceed to either release a day one patch or a post-launch patch to address the issues.
A lot of gamers and designers in the comment section were impressed with the way the crash handler was implemented into Sonic 3D Blast. I'm a little curious how the designers planned on identifying and fixing very specific issues if it just reset into the level select menu? Either way, it's ancient history at this point and an interesting peek behind the curtain from a 16-bit classic.