Cognitive Dissonance is a False theory termed for the given scenario. The correct term for the given scenario is Drive reduction Theory.
Explanation:
Cognitive dissonance refers to someone's behaviour conflicts with their beliefs or attitudes which does not matches with the given scenario. The drive reduction theory describes people’s drive or motivation to satisfy their desires. This drive or desire create arousal and tension emanating from biological or physiological needs. It means that people often experience drive or desires that increases negative needs.
Furthermore, unsatisfied desire also creates tension or unpleasant feeling that need to be reduced. The only thing that lowers the drivers is if one satisfy their needs or desire. As in the question, when we deny our sugar craving, it simply doesn’t go away, it builds up until it is satisfied.