There are more efficient modes of running that aren't really available when walking, and any experienced marathoner knows how to exploit this. It took me years of occasional running before it all clicked, despite more experienced friends having shared youtube videos on the subject. I'd always been running in a fashion more like a slowed down sprint when trying to pace myself. But that's not the efficient way, the eff…
Is heel striking bad? I am not a runner, but I've practiced heel striking while backpacking to give myself more foot-stamina. Maybe there's a better way?
Also, as well as the shock to your body of absorbing the impact energy this way, it is less efficient: if your more springy bits absorb the energy instead of your solid structure, then they can release some of it back in a useful direction as you push off again with that foot making it easier for you to maintain the same pace. On top of that, because the “stop” of each stride is less abrupt less energy is lost to entropy through your flesh jiggling because of inertia.
I'm pretty sure this is all different for a walking pace though, which would explain you seeing a benefit from the opposite advice. With a walking gait your forward momentum is provided & maintained by the foot rolling over the floor and pushing sideways against it, rather than striking and pushing away from it like in a sprint, with running being somewhere between (running and springing are different as much as running and walking are: a sprint is a period of acceleration or maintaining top speed, a running posture is for efficiently maintaining a cruising speed or more slowly accelerating - the mechanics, while similar, have key differences).