I think it has to do with the satiety centre in the brain. If you're not getting enough sleep, sex, meaningful interpersonal contact, whatever, then it creates a gnawing hole in your biochemistry. Food -esp things like sugar & chocolate & alcohol - actually press that biochemical button and give you a feeling of fulfillment. It's chemical. AH I know how sad that sounds...I feel fulfilled by my chocolate. But that's really what's happening. So it's helpful to think in these terms and work out what else you could be using to press that biochemical button - more sleep? Exercise in the sunshine? Sex? Time doing a hobby? Apparently meditation practice can help with this, and this is the angle I'm trying to work on at the moment. I know i'm yearning for something meaningful in my life - no amount of chocolate is ever going to fill that void.
That is awesome explanation!! When I feel more fulfilled I definitely eat less junk. Now I am unhappy with new work, not really anyone to talk to and wanting junk more and more often. I always wonder how I can know what I need to do and want it so badly but the compulsion for junk always overrides.

PS. I am on the 40kg to lose ship as well.