Basically, when I feel frustrated or out of control, I have an overwhelming urge to buy and consume sweets or chocolate. Whether I'm hungry at the time is completely irrelevant. I find it most often happens at work, say if my boss says something unreasonable to me, but that I can't change, it would just strike me, and I would just go and buy whatever was available - a block of chocolate or a bag of sweets, and consume them in a short period, but sort of secretly in my office. I'm not a psychologist, but there's a lot more than just food going on there.
It is different to say, me being hungry, and choosing a chocolate bar over an apple.