"It is normally easy and actually quite pleasant to walk and think at the same time, but at the extremes these activities appear to compete for ... limited resources," writes Daniel Kahneman in his book Thinking Fast and Slow. "My experience is that I can think while strolling but cannot engage in mental work that imposes a heavy load on short-term memory."
Without going into the nuances of Kahneman's theory (in large part because I've just started the book and am still figuring them out!), what he's saying here is fairly straightforward: There is only so much energy to go around, and it's difficult if not impossible to expend great mental and physical effort at the same time.
In my experience, walking promotes thought. The mental briars that entangle me when I'm sitting still aren't present when I'm skimming along a trail. Motion accelerates thought, enlarges it, shakes it free.
The explanation is, in part, speed. Were I to run I would think a lot less. But the answer also lies in something Kahneman discusses a few paragraphs later, the concept of flow, "a state of effortless concentration so deep that [people] lose their sense of time, of themselves, of their problems."
What happens when we walk (or at least when I walk) is flow in motion. Which sounds redundant. But actually isn't.