Imagine you have been sent back millions of years to pre-civilized society. All of your modern-day comforts are gone. Your goals of losing weight, becoming more productive and learning a new language have now been replaced by securing food, finding a mate and keeping safe from predators.
All of your thoughts, all of your focus, all of your creativity are now simply on securing these 3 things in order to survive. This was the case for us over millions and millions of years of evolution, and it explains our modern day problems with willpower.
WHY WE ARE WIRED TO INDULGE
Throughout this time in the Stone Age, our limbic system (the part of the brain responsible for our emotions, impulses and fight-or-flight response) was developed.
To secure food, our brains evolved to give us cravings. When we saw a gazelle, our brains wanted to give us as much focus and energy to hunt it down as possible. So it began releasing a chemical called dopamine. This chemical activates our reward system and motivates us to hunt that gazelle down. Today, this same rush is released to make us crave those donuts that someone brought to the office. 
To secure a mate, our brains evolved to give us sex drive. Humans of the opposite sex that weren’t related to us weren’t as easy to find back then. So when we did find one, our brains didn’t want us to miss the opportunity. Again, the brain started releasing dopamine to give us motivation to overcome obstacles in the way of ensuring the human race would continue. Today, this can get us in trouble as we are literally wired to “overcome obstacles” such as not having proper protection.
Finally, to ensure safety, our brains were wired to rest as much as possible. Because we didn’t know where our next meal would be coming from, we had to save our physical and mental energy. This means that when we expended energy throughout the day, our brains would convince us that we were more tired than we actually were to motivate us to rest. Today this means giving us the preconceived notion to skip the gym and hit the couch.
THE EVOLUTION OF WILLPOWER
After millions of years of living this life and focusing on securing these 3 things, we discovered something profound, “it will be far easier to get these things if I join a tribe!”
So now we have a new ingredient that is necessary for survival – getting along with others. Our brains, which had once been evolved to solely act on our personal needs and desires, now have to think about the wellbeing of others. We have to control our desires to take some other tribe member’s food, mate and shelter. Otherwise we risk being exiled from the community. 
Welcome to the first development of willpower. All of the sudden, acting solely on our own survival instincts could lead to trouble. So now we start questioning the consequences of our actions to see if they may hurt us in the long run. This higher level of abstract thinking helped in our development of the pre-frontal cortex – the area of the brain responsible for creativity, communication and willpower. 
THE DEVELOPMENT OF WILLPOWER THROUGH HISTORY
Since this time, we have developed our willpower immensely. As we developed scientific theories, innovation and art, we began rewiring our brains to focus more on creativity, science and innovation. As we came into contact with more people, we began developing better language skills in order to communicate with them.
All of this history has created a power shift from the raw, emotional and impulsive part of the brain to the controlled, linguistic genius part of it. Giving us better capability to exert our willpower.
WHAT THIS MEANS IN OUR WORLD TODAY
Today, our pre-frontal cortex is more evolved than any other time in history. Giving us a greater ability to exert willpower and self-control than ever before.
However, the higher thinking brain was developed long after the brain that focused solely on acquiring food, a mate and safety. It has had a much shorter period of history to evolve and grow stronger. So even today the brain will naturally place our primary functions higher on the priority list than self-control.
So we are still doomed to struggle with the desires of the brain that formed millions of years ago. Which is why we can all agree that we are not living in a utopia of self-control.
And it gets worse. Today there are infinitely more stimuli out there that activate our primal, emotional brain. Our ancestors could hope to see a gazelle maybe once a week, but now the average person makes over 200 food decisions every day! 
So every time we see food, we use up a part of our willpower to say “no” to the primal brain’s natural reaction to “hunt that food down”. This same phenomenon occurs for the increase in sexual images that we see in advertising as well as the increased fears that are put on display by the media.
SO WHAT CAN WE DO?
You may notice that the last paragraph is a little extreme. If we really did have to use willpower to deny ourselves food 200 times a day, we would be exhausted. So how have our modern day brains come to deny temptations without having to think about them?
The answer lies in our behavioral commitments. Through our commitments we have strengthened our prefrontal cortex so much that it isn't hard to make the choice anymore. This was found when researchers gave Hershey's Kisses to a group of people who were on a diet, and others who had been habitually eating healthy for years. Despite the fact that the healthy eaters knew that the kiss would taste delicious, they reported no cravings for it. 
Another example of this in our daily lives comes from our relationship commitments. Although there are plenty of sexual temptations out there, most people in a happy and healthy relationship don't have a problem saying "no". It's not a drain on their willpower because they have a commitment that is more important to them than any immediate pleasure.
When we make commitments based on our principles or identity, we strengthen our prefrontal cortex and don't need to expend our willpower to turn down temptations. This process can either come passively or purposefully. To make this process purposeful, follow these steps.
FINAL WORD: YOU ALWAYS HAVE A CHOICE
In order to hold ourselves back from doing things that would exile us from the tribe, our pre-frontal cortex developed so that it would be "final decider" of our actions. No matter how much we were tempted to steal food or steal a mate, we developed so that we did not have to act on those impulses. 
This means that even when we are the most tired, the most tempted and the most likely to give in to short-term rewards, we always have the ability to choose our ultimate actions. So no matter how tempting that cheesecake, or how stressed you feel from work, remember that you will always have the strength to make the right decision - no matter how hard that may be,.
We can learn a lot about our willpower by looking at evolution. Our brains are the product of millions of years of hunting and gathering with a focus on 3 things: eat, reproduce, and survive. Then within the last 100,000 years or so, we realized that we are much better at achieving these goals with the help of a tribe.
When we became a part of a tribe, we began to develop self-control in order to get along with the other members. This evolved into our modern day conception of willpower. As we have developed as a species, so has our brain’s capability of exerting willpower to persevere on challenging tasks, resist temptations like food and sex and focus on long-term goals.
For better or worse, we still have our primitive instincts to acquire food, sex and safety. But with our ever-developing willpower, we can direct these desires to our benefit. Regardless of how tempted we may be, or how tired we may feel, we always have the ability to choose our ultimate actions. We always have the willpower to do what’s right.
Wise, Roy A. "Brain Reward Circuitry." Neuron 36.2 (2002): 229-40
Dunbar, R.i.m. "TSB: Mind, Language, and Society in Evolutionary Perspective." Annual Review of Anthropology 32.1 (2003): 163-81.
Irwin, Louis N. Comparative Neuroscience and Neurobiology. Boston: Birkhäuser, 1988. Print
Wansink, Brian. Mindless Eating: Why We Eat More than We Think. New York: Bantam, 2006
Forman, E., K. Hoffman, K. Mcgrath, J. Herbert, L. Brandsma, and M. Lowe. "A Comparison of Acceptance- and Control-based Strategies for Coping with Food Cravings: An Analog Study." Behaviour Research and Therapy 45.10 (2007): 2372-386
McGonigal, Kelly. The Willpower Instinct: How Self-control Works, Why It Matters, and What You Can Do to Get More of It. New York: Avery, 2012.