To get things clear the question of four legs only arises when we consider amphibians, reptiles and mammals which itself rules out most of life on Earth.

On a slightly unrelated note, many people today who are aged 40+ experience back problems due to their spine being unable to withstand the weight of the body. That humans are bipedal, is a result of the fact that having two limbs free allows us to design tools and use them. Our fingers have more dexterity than our toes.

If we analyze the evolution of complex life (I use this term liberally), living beings developed in a pronograde (spine horizontal) posture. At some point of time, our ancestors found it easy to walk upright, as a result humans and some of our cousin species walk upright as this allows use of hands. Many monkeys use their hands for many of their day-to-day activities.

Asking why organisms don’t have two legs is like asking why humans don’t have wings. Evolution doesn’t randomly produce new adaptations. Try imagining a tiger or elephant walking with two legs. You could take it even further and try imagining a reason for them to leave their everyday, comfortable lives to become bipedal. There is simply no selecting pressure for them to have two legs and thus they don’t.