A person's standing before God is determined by their choices in the present moment, rather than a stored collection of past good deeds. Judgment rests entirely on current behavior, meaning an individual cannot lean on the merits they gathered over time [ביאור שטיינזלץ]. Even someone who has lived a righteous life and received a promise of life might make a fatal miscalculation. They might decide to commit a wrong, feeling completely confident that their long history of good deeds will shield them from consequences. They assume God will simply overlook or forgive this new offense because of the extensive goodness they practiced for many days [מצודת דוד].
A deeper perspective reveals a fundamental shift in the person's inner values. In this scenario, the individual actually comes to regret their earlier good deeds. Drawn to worldly desires, they feel sorry for the time they spent holding themselves back from doing whatever they pleased. Yet, despite this deep regret for their own righteous past, they still hold onto the illusion that those past actions will somehow work in their favor and protect them [רד״ק].
Because of this deliberate choice to turn toward wrongdoing, the entire record of their past goodness is erased from consideration. All the righteous acts they previously performed will not be remembered, and those past merits will do nothing to save them from the punishment for their current offense [רש״י, מצודת דוד]. Ultimately, the person will face death as a direct result of the wrong they have just chosen to commit [מצודת דוד].