Why can't most people execute for the long term? What is commonly referred to as willpower?

Humans are controlled by the seven emotions and six desires, but the seven emotions and six desires themselves are evolutionary algorithms used to guide human behavior.

In fact, when genes designed humans, they designed the algorithm for willpower, which only requires one loop:

while the condition is true:

execute

But why wasn't it designed this way? Or why did the above design fail and become lost?