You may find it trivial to move up and down while walking, but this motion is a masterpiece of 4 cm shaped by 7 million years of marriage between smoothness and bounce. This vertical movement, first noticed by Aristotle and now tracked by satellites, is particularly beneficial for loading our muscles to perform a little work efficiently. A lesson on how optimization is a relative success story, and not perfection, is described here
Massaad, F., Lejeune, T., & Detrembleur, C. (2008). Why do we bob up and down while walking ? : The mystery of antiquity shadow finally deciphered. News in Physiological Sciences, 71(1), 25-28. https://hdl.handle.net/2078.5/156181 (Original work published 2008)