I always wondered if restarting in 6-1 in Ninja Gaiden was a bug. I really think it's a bug rather than an expected behavious, since the game always restarts you to current level, even on game overs, on levels 1-5.
That is actually the only place in the game where it explicitly sets your level number.
I tried to make a Game Genie level select code for a friend and realizes the game expects the level number to be 0 (1-1) from the RAM-clear routine. After that it increments the level number when you finish a substage (ie. from 1-1 to 1-2) and then decrements the level number when you die against a boss (that is why when you loss against a boss you are sent back to the START of the previous substage, even though if you die before the boss you go back to a checkpoint).
(actually the routine is checked when you die against a boss. If you are at the ID for stage 6-4 (IIRC it's $19) or greater, then it sets the level ID for 6-1, else it does DEC LevelNumber.
Actually, there must be one other routine that changes the level number to allow you to skip to the other final bosses, as they are technically stage 6-5 and 6-6.)
I remember the level number is $006E in RAM if you want to check yourself.