From the wiki:
Created by Kazuhisa Hashimoto, who was developing the home port of the 1985 arcade game Gradius, a scrolling shooter released on the Nintendo Entertainment System in 1986. Finding the game too difficult to play through during testing, he created a cheat code to give the player a full set of power-ups (normally attained gradually throughout the game). The code was present in the released Gradius after Kazuhisa forgot to remove the code.
It is still present today in numerous games and even websites. Even here, really! try it!