That’s a good question! I guess the answer lies in our evolutionary ancestors – the primates. These were tree-dwelling animals, which meant that it was important for them to have lots of upper body strength to be able to move between trees, grab onto branches, and hold onto things like food or babies at the same time. That means that our bodies developed in a hugely way to things that moved on the ground, like elephants. For ground-based animals, it would have been more important to walk on 4 legs because it means you can run in an open area much faster and more efficiently, meaning that it’s easier for you to catch prey to eat, or to run away from predators.
When we came down from the trees, we would have probably tried to walk on all fours – and you can still see this today in chimpanzees, our closest cousins, who walk using their front knuckles. However, at some point in our evolutionary past, some of our ancestors found it more energy-efficient to walk on 2 legs instead of 4 (i.e. they found it easier to move about on 2 legs). Because they needed less energy to walk around, these ancestors would have found it easier to survive (they wouldn’t have needed to eat as much food, which might be important in times when foods are scarce), and so became a successful species – us!