Why do humans have 2 legs?
Because it saves energy.
Walking on all four takes more energy than walking on two. This energy expenditure contributed to human evolution. Fossils show that some ancient humans developed longer legs, different hip structures or thicker leg bones, consistent with modern-day humans. These adaptations made upright walking easier and lessened the amount of energy required to walk upright.
The study, performed by three researchers from the University of Arizona, the University of California, Davis, and Washington University in St. Louis, examined differences in upright walking between four adult humans and five adult chimpanzees. Chimpanzees were used because they're the closest modern-day relative to humans. (Four to seven million years ago, humans and chimpanzees diverged from a common ancestor. They then developed independently.)
Researchers taught the five adult chimpanzees to walk on treadmills. They walked upright on their hind legs and knucklewalked on all fours. The chimps wore masks that tracked how much oxygen they used. The researchers also measured how much pressure was exerted on the treadmill. This revealed which muscles the animals were using. The same measurements were taken for the four adult humans.
The walking tests showed that the chimps, as a group, averaged the same energy expenditure walking on all fours as they did walking on two legs. As a group, the humans used 75 percent less energy walking upright than the chimps used walking on all fours. Essentially, walking upright seemed to be beneficial because it saved energy.