eating chocolate releases dopamine, the feel good chemical, so after a while without your body fancies a bit of that, also, if you're cutting out certain foods or dieting your blood sugar levels will dictate what foods you crave, for example if you're not eating enough carbs your body will crave sugary high carb foods.