We are told by The Cutting Room Floor this interesting fact. Super Mario Bros. 3 has a debug mode that activates when a specific memory location contains 80 hex, that allows the user to grant Mario any powerup. In normal play this never activates because the cartridge initializes all of RAM to 0 as part of initialization. But the version of the game included in SNES Super Mario All-Stars, while it closely follows the original’s logic in many ways including including debug mode and its criteria for activation, doesn’t initialize memory when starting up. When the console boots up, its RAM contains random voltages that can be interpreted as nearly any value, and there’s a chance that there’ll be 80 hex in memory location 7E0160, and enable the debug mode for Super Mario Bros. 3.
While ordinarily this would be a 1-in-256 chance, some consoles are prone to favoring specific values, so some units will turn on debug mode more often. As a result a legend developed that certain Super Mario All-Star cartridges are special debug versions that accidentally got put into retail boxes and sold.
Supper Mario Broth made a short video (about 1 1/2 minutes) explaining how it works in crudely animated form:
As it turns out, Mario All-Stars has its own debug modes for each game in the compilation, but the one for Mario 3 is different, and buggier. Meanwhile the original debug mode for Mario 3 remains, intact, buried in the code, waiting for the value 80 hex to appear in its magic location to unveil itself.