When you hike (or run, bike, etc...), you are using multiple energy pathways. The rate of energy production from each of these pathways is different.
For the sake of simplicity, we are only going to talk about the two systems that use glycogen (stored sugar). Anaerobic glycolysis can produce ATP (energy) at a faster rate than aerobic glycolysis can. The faster you are moving and harder you are working, the more energy you are going to get anaerobically. Ok sounds great!
But as you would guess, there's a cost to that. The cost is how much glycogen is used.
Aerobic glycolysis requires 2 molecules of glucose to produce 32 ATP (mid 30's, it's not clear the exact amount).
Anaerobic requires 2 molecules of glucose to produce 2 ATP.
That means that using anaerobic energy will suck up 16 times the amount of stored glycogen as using aerobic!!! And since stored glycogen takes days to replenish, you aren't getting that energy back during the day.
Below is a theoretical (as in don't take the number literally, but they make a point) graph of how much elevation you can gain depending on how fast you are going, approximately based on the carbs in / energy out values above. And yes it's a "duh" conclusion - slow but steady will take you a lot farther.
Its like having two engines in your car that share a fuel source - one engine is a Civic and one is from a drag racing car. If you wanna go fast enough that you need to use the drag car engine (at least partially), you are gonna suck down the gasoline a lot more quickly than if you only used the Civic engine. And you won't go nearly as far on a tank of gas, just as in the graph above.
Another point is that you will pay dearly for going too fast. Rate of glycolysis is nonlinear with speed. Let's say you know you can hike at 3 mph steady for 4 hrs. One time you start hiking at 4 mph for 1/2 hour, then you slow up. Think you can slow down to 2 mph for 1/2 to make up for it. NO. 4 mph takes up more than twice the glycogen as 2 mph, meaning you may have to go 2 mph for the rest of the day to save your fuel.
If you go sprint up a hill for a minute, it may cost you 10 minutes (totally making this number up) over the next few hours. When people "hit the wall", they have run out of glycogen too early b/c they are moving just a little too fast.
Taking many breaks does very little. It doesn't get the energy back. Two guys - one moving steady but slower and the other moving a bit faster but taking breaks - may end up at the summit at the same time, but the slow guy is going to have more energy left.
Ok Ok But What About Altitude?
People always mention that you need to eat more when hiking at high altitudes because you are burning off more calories. This is partially incorrect. The workload is the same, no matter the altitude. You may have some physiological changes that require more energy, but these are probably slight relative to energy used from hiking.
So what's happening? Well you should know that altitude has lower pressure and it's harder to get oxygen into the bloodstream and to the muscles. This means that if you are moving at a certain speed / workload, you are getting less of your energy from aerobic glycolysis, and more from anaerobic glycolysis!
When you are hiking the last few miles up to the summit of Mt Whitney, you are already going slow as you can because of the low pressure. Even at that speed, your body is sucking up glycogen at a high rate because too much is coming from anaerobic energy.
This is why it's important to eat a lot (especially carbs) when doing multiday treks, especially at altitude. Your body will be sapped of glycogen from altitude. And while conditioning won't affect your likely hood of getting AMS, it may help increase glycogen storage.