I think it is a blend of internal motivation and external consequences and the levels of each and how we manipulate them.
For me, the 100% rule comes into play:
http://www.smh.com.au/lifestyle/health-and-wellbeing/the-100-per-cent-rule-the-simple-advice-that-changed-my-life-20160825-gr16da.html Things I choose to 100% on I do, but I know I'm an all or nothing type, and I can justify *anything* to myself if I want to.
Then there is also the games your brain plays, your brains main purpose is to keep you alive and happy, so if you get a momentary boost from something or something is habit, you have to actively work against or train your brain into accepting new habits. That doesn't happen overnight and there is definitely some "opps" and learning involved in the process.
Then there is the "Fuck it, I've already fallen off the wagon" mentality that traps so many of us, once the breaks are off, it is very hard to get back on track.
Then there is the basic fact that we lie to ourselves all.the.time. and eventually, we stop believing the promises we make to ourselves. Why should this time be any different than the last 100 times we said we were going to do something and didn't? Every time you do this it reinforces that you don' take yourself seriously or honor your own word - and that makes an impact even if we aren't really aware of it.
Then there are the external consequences, we generally break our word or ourselves more than to others due to the conditioning of operating as community, and being reliant on others for mutual survival. That is why accountability to others usually works better. There is external social pressures, that if strong enough or the consequences of not following through are severe, it will have a bigger impact. This is why Diet bets, publicly stating if you don't follow through you will make a donation to something you despise and other things like that tend to work well.