I've had a few friends who've gone through quitting smoking. The hard part, they say, is that certain things trigger wanting to smoke. Stressful situation? Time to smoke. Driving a car? Time to smoke. Drinking at a bar? Time to smoke. The reason that bad habits are so hard to quit is that we have these many triggers that start us down that path almost automatically. A compulsive eater might get into a stressful situation and have a hamburger halfway into their face before they even consciously think about whether or not they should be eating.
The silver lining of this nuance of human nature is that we can also harness triggers to create positive habits. Just as bad habits are so hard to break because of our triggers, good habits can be made resilient using the same mechanism. And just as bad habits are built slowly and incrementally, so are good habits.