Obviously not all calories are created equal. If that were the case, we'd just load up with sticks of butter or lard, with fats running at approx. 4,000 calories per pound. Very efficient, that. Carbs are easy to find, and often inexpensive, and definitely meet or satisfy the quick-energy boost requirements. Backpacking can be grueling, no doubt about it.
I doubt it's much of a factor for hard core hikers who regularly hit the trails and are already in excellent physical shape, though one thing I picked up eventually, after performing any sort of heavy exertion, good quality protein in adequate (large) amounts has a very noticeable effect on how I will feel the next day after picking 'em up and putting 'em down. Junk food is not your friend here. Has to do with muscle recovery I expect. I didn't grok this at all as a novice backpacker, I just pitched a bunch of food in the main compartment and gave it the ole hairy eyeball "Yeah, that oughtta do for a week or so". And it did, mostly. Don't misunderstand, carbs are important when backpacking, in a way that aren't even necessary at home, sitting behind a desk, or watching TV or whatever.
But I noticed I was also bouncing off the walls by day 3 or 4. High carbohydrate junk foods or candy will never satisfy or satiate the way a proper mix of carbs, fats and protein will, they simply make the blood glucose level do the roller coaster thing, triggering the hunger for more carbs. There's also a school of thought that suggests avoiding large changes in diet from ordinary city life to trail, it tends to cause "gut issues" shall we say. I suppose a certain amount of that is inevitable, but it is something to try and minimize. Concentrated, high calorie food is also lacking in bulk or fiber. Nobody gains weight on a backpacking trip, but don't look at it as an excuse to eat junk.