One possible reason is that stress can affect blood sugar levels and deplete nutrients, and the body may crave more nutrient-dense foods to compensate. Sweet foods are not normally nutrient-dense, whereas animal proteins and dairy products are very nutrient dense.
It has been suggested that one reason women crave certain foods at different times has to do with hormonal activity and the ways in which certain nutrients are depleted during menstruation and pregnancy. Iron loss is common during menstruation and iron-rich foods include red meat, spinach, whole grains and black beans. Women's craving for chocolate is not linked so much to the sweetness as it is to the high levels of magnesium found in chocolate, a mineral needed for effective calcium absorption. Loss of calcium aggravates stress, and can cause muscle twitches and irritability.
Failure to crave sweets during times of stress may in this way be linked to the body's attempt to prevent calcium, magnesium and/or iron loss.