According to a small study (via The Body Odd), not getting enough ZZZs can make it harder for you (and me) to resist temptation. That makes sense. Whenever I'm tired at work, I end up drinking a coke and eating whatever candy I can find around my desk and/or the kitchen. I'm also more likely to eat junky food at lunch.
In this study, a small group of healthy adults had their brains scanned while shown images of low-caloried (salads, fruits, veggies, etc.) and high-caloried foods (cakes, burgers, fries, etc.), plus a few neutral pictures of rocks, trees, and flowers. They also completed questionnaires about the levels of drowsiness they felt during the day, their food likes/dislikes, and their eating habits.
Scientists found that "the sleepier you are, the less the prefrontal cortex -- the inhibitory area of the brain -- is activated when it's shown high-calorie foods." Meaning, you're less likely to stop yourself from eating an extra side of bacon or another slice of chocolate cake when you're sleepy. The participants were not chronically sleep-deprived; they had their usual tiredness from lacking an extra hour or two of sleep.
Of course, lack of sleep can lead to lots of other unhealthy behaviors too. For example, being cranky, driving unsafely, being unable to focus at work, etc. I'm sure you can think of a million other things just from experience. Maybe we should start prioritizing shut-eye time :)