xkcd

The Food Forum's Evil Twin. Trying to lose weight or get in shape? Tips, encouragement, status reports, and so forth go here.Disclaimer: Unless otherwise stated, we are not health professionals. Take advice with salt.

Off the top of my head I think the two reasons I most often hear for cravings being:

1. Deficencies. Some deficiencies makes you crave things apparently. I'm sure there's some guides on ye olde google relating to it. I seem to recall chocolate-cravings having to do with magnesium deficiencies and salt cravings being tied to fluctuations in stress hormones. Edit: I can't seem to find any sources on this that isn't stupid as shit fitness blogs though, so I'd take it with a grain of salt.

2. Emotional attachment. A lot of us have been ingrained with food being a reward for when we do good. Or when we need comfort. Often of the type "For every page I write on this paper I will have a cookie.","It's saturday, my friends are here, we're going to have a good time, so we need lots of snacks." or "my girlfriend/boyfriend just broke up with me, time to whip out the ice-cream!" Thus we start to crave things cause our brains associate it with feeling good, and who doesn't want to feel good? This is why shaming people about weight is a really shit incentive for weight-loss, as it makes people feel bad and give up, and what's there to always cheer them up like a good reliable friend? Food! (There are heaps of other reasons too, but this is one of them.)

There are physical and mental reasons. I think angry squirrel summed them up pretty nicely; maybe we should add that your blood sugar also plays a big role. When you're used to eating sugary foods frequently, your body will adapt to this and you'll crave sweet food if you haven't had any in a while.

“Human beings make life so interesting. Do you know, that in a universe so full of wonders, they have managed to invent boredom.”