The following is an excerpt from a study done in 2005 at MIT. The full article is here.
Brain researchers explain why old habits die hardCathryn M. Delude, News Office Correspondent
Habits help us through the day, eliminating the need to strategize about each tiny step involved in making a frothy latte, driving to work and other complex routines. Bad habits, though, can have a vise grip on both mind and behavior. Notoriously hard to break, they are devilishly easy to resume, as many reformed smokers discover.
"We knew that neurons can change their firing patterns when habits are learned, but it is startling to find that these patterns reverse when the habit is lost, only to recur again as soon as something kicks off the habit again," said Graybiel, who is also the Walter A. Rosenblith Professor of Neuroscience in MIT's Department of Brain and Cognitive Sciences (BCS).
"It is as though somehow, the brain retains a memory of the habit context, and this pattern can be triggered if the right habit cues come back," Graybiel said. "This situation is familiar to anyone who is trying to lose weight or to control a well-engrained habit. Just the sight of a piece of chocolate cake can reset all those good intentions." --------
So beware - even if we replace a bad habit with a good habit the neural pathways have memory and can easily fall back into whatever activity was previously engaged in. Especially if there was a 'reward' involved, such as sugar.