It's well known that brain functioning consumes a lot of energy. I assume you are familiar with the headache that you have after few hours long exam, or after few hours working in the library.
Someone eats chocolate, someone candies, all this product contains sugar. It looks like sugar help to overcome the problem.
What is considered to be at the same time healthy and with sufficient energy supplement for the brain to continue working.