The straightforward hypothesis would be "by reducing other body functions". For the duration of a Barry's Bootcamp class, my watch (probably over-)estimates my calorific expenditure at 1000 kcal. I know that right after that, I could probably not do too much Mathematics. Frequently, I encounter visual snow. But most of the time, I can do Mathematics.
And then there's healing, and saliva generation, and digestion, etc. I'm sure there's a lot of room for energy savings.
I definitely notice brain fog when exercising heavily or on caloric restriction. It's like my ADHD goes into hyperdrive. Probably great for hunting down food on the savannah though.
I’m like that too sometimes after a particularly difficult workout. I can’t make conversation or make sense of things I would normally have no trouble with (programming related).
And then there's healing, and saliva generation, and digestion, etc. I'm sure there's a lot of room for energy savings.