All terrestrial vertebrate animals have four limbs (plus head and tail), except for snakes, who used to have them, but lost them again through evolution. But why do they have four limbs?
Evolutionary biologists will answer the question without answering it. They will explain that terrestrial vertebrates descended from a fish-like ancestor that had four limbs. C’est tout. But this answer does not satisfy. The answer insinuates evolution works at random, with no regard for form and function, and could produce any of infinite possible outcomes.
After having carefully observed a herd of horses walking by, I noticed they gently move one leg at a time. With each step, the horses carefully leaned forward as if to reassure themselves their new footing offered stability. Working together, the head and the tail offer balance during movement. With one of their four legs spent on movement, the remaining three provide low-cost stability, like a camera tripod. The tripod’s form, with three legs, intrinsically provides the function of stability with the least amount of effort, both unlike two-legged beings and unlike a four-legged picnic table.
We conclude that form and function matter to evolution—populations with cost-effective solutions to new external demands (environment and other lifeforms; the ever-changing niche) would have higher chances of reproducing offspring, passing more of their low-cost genes.
Since the fish vertebrates descended from were horizontally configured beings, two legs would not suffice to move on land. Three legs produces awkwardly inefficient movement and loss of stability during movement. This leaves no other option than to evolve four legs, the lowest-cost configuration providing both stability, mobility and balance.
Evolution thus works like water flowing from a higher to a lower point using the least energy. The evolution of life flows into (i.e. adapts to) new niches via the most economic way.
In other words, evolution works neither by design nor by chance, but follows a third alternative: natural selection. Evolution concerns itself with competing economic solutions, and will therefore never produce outrageously costly fantasy outcomes. Elephants will not suddenly evolve wings to fly. It means that physics and mathematics have set the boundaries within which evolution can occur. Those boundaries depend on the same unique constants that allow the universe to exist.
…but then again, why do people have five fingers on each hand? What economic benefit is there to have five fingers rather than four or six?