If you were dreaming of dessert, your stomach may be hungry. Your internal organ may have sent signals to your brain, which triggered this dream about food. You may have a craving for sweet food. During your day, you may have fought off temptations to eat a sweet dish, but at night, the thought that disturbed you, is carried forwards into your dream.
Why did your brain use the imagery of a dessert and not just any other food? A dessert is a sweet food and you might have been craving for that taste.
On a more complex level, you might have been working hard for the past few days, and you crave for a reward. Food is often used as a reward and your brain has triggered this dream, as a response.