Nethack can be thought of to be made up of several stages of gameplay.
The first stage is the early game where survival and sometimes securing food is of supreme importance. This continues to the middle game where survival is less of a pressure and the game is about completing an ascension kit. In the late game, survival is almost guaranteed (bar those YASDs that an amulet of life saving could have saved you from), and the goal is to get the amulet of Yendor and resurface. Finally, in the endgame (the planes) your final death is a possibility again and you must fend it off while racing to ascend.