Is there a reason why food cravings happen during a pregnancy?

You’ve probably heard plenty of stories about pregnant women making their husbands go to the grocery store to pick up some totally weird foods.