To understand why we must first understand how.
Standing. Standing is crucial to being able to walk, that is, developing the strength to stand on one's feet. Usually, this starts with supported standing by a parent or an object. This builds coordination, flexibility, and further curiosity for the tiny human to keep moving around in the way that they can, most efficiently (which is walking as opposed to crawling).
Now we can attempt to hypothesize why.
As others have said, efficiency is huge. It takes less energy to walk than to crawl 10 feet, once the ability is there. Many might say that it is similar to making the decision to walking 10 miles or learning how to bike so that you can bike 10 miles. Clearly, biking is a more efficient mode of transportation. Getting from one place to another is a very integral part of human development and ability. Efficiency, paired with the curiosity that seems very integral in a baby's psychology, leads to the baby wanting to travel from place to place and see and touch and eat everything it can.
Is it evolutionarily beneficial for babies to move around a lot, efficiently? I think the answer is yes. In order to prove this, let's assume the answer is no. If no, then humans as a whole would just be content not getting around efficiently and have indifference toward them using as much energy as possible during the action. This is clearly inhuman and not self-preserving, and obviously a contradiction. Thus, it must be evolutionarily beneficial for babies to move around a lot. Furthermore, the movement and curiosity may lead to increased exposure to the elements and foreign biological organisms, giving the kids the chance to develop their immune system, like we all know is so crucial at that age. There is probably more examples to help this argument, but this example proves the point and concept. Moving efficiently is evolutionarily beneficial.
A more sociological question would be, would babies try to walk if no one else did? Is it nature or nurture? If we all in society crawled, would the baby too? Mirroring might play a very powerful role here. Testing this would be very interesting, but it would likely violate the Belmont agreement.
- Standing. https://www.parentingscience.com/when-do-babies-start-walking.html