There were some games you were supposed to complete in one shot. The one from my childhood that comes to mind was Super Double Dragon on the SNES. It was built like an arcade game, you got so many lives at the start, and you had to beat it in that many lives. Your health on your current life would be recharged on each new level. The game had seven levels.
Others had password systems. They weren't really passwords; what they were was basically a hash or encrypted string that represented the game's state. Depending on the game, at the end of a level, or at any point during gameplay in the pause menu or something, it would display a password which you then wrote down on a piece of paper with a pen like a Mesopotamian. Restarting the game, you could find a password entry screen that would launch the game with those parameters. Metroid on the NES worked this way, and it was early enough and popular enough to become kind of infamous for it, Metroid included the entire alphabet, number and some symbols, so you could spell entire words, some of which produced interesting results. ENGAGE RIDLEY MOTHER FUCKER is technically invalid but it generates interesting results, as does MOTHER BRAIN? FUCKIN TOASST. A young man named Justin Bailey found that his name works surprisingly well, and NARPAS SWORD0 000000 000000 must have been hard-coded. These passwords got passed around and even printed in the gaming press, so later games omitted vowels from their password system to prevent them from spelling coherent words.
Still others hid secrets that allowed skilled or knowledgeable players to skip levels. The poster child here is of course Super Mario Bros; they figured newer players would play the first few levels to the point they gained proficiency, and then would discover the warp zones that let them warp ahead, thus skipping the parts of the game they've played already.