As stated in a recent article, researchers have found that as you get hungrier high calorie foods become more and more appetizing. When glucose levels drop, an area of the brain that controls emotion and impulses loses its' ability to decrease your desire for high calorie foods, so that cake looks twice as good. Researchers at Yale ran studies using an fMRI where they monitored changes in blood levels of subjects while they were shown images of high-calorie, low-calorie, and non-food. When glucose levels drop, the hypothalamus can sense the change. When this happens, the insula and striatum are activated, which makes people want to eat more.
I think this is a study that a lot of people can relate to, as I know many people have late night cravings to eat something because they haven't eaten in a few hours and often are tempted to eat the worst foods for you, and this can help to explain why we make those choices.