Ancient reptiles first walked on two legs thanks to their tails
The first vertebrates to walk on land used four limbs to do so, having evolved from horizontally-inclined fish. After millions of years, some species began to increasingly rely on their back legs for locomotion, becoming the first bipedal animals. That transition was a bit mysterious, with some speculating that standing upright was driven by a desire to use forelimbs for grasping, although why some of these bipedal herbivores would need to grab objects isn’t quite clear. Plenty of animals could stand to run faster, either catch food or avoid becoming it, which is now thought to be a probable driver of this adaptation. It may not seem intuitive to humans, but the key anatomy for this reptilian bipedalism isn’t the arms, but evolution of the tail.
Faster on only two feet
The early bipeds known as proto-dinosaurs evolved varying body types, including the speedy, bipedal stance that would later be seen on predatory theropods like Tyrannosaurus rex. To make this stance faster, proto-dinosaurs like the dainty Marasuchus lilloensis evolved longer legs, but also a tail that was close to the length of its body and head combined. That long, developed tail provided mass for balance and maneuverability when running, but it also carried a lot of muscle to help power the animal’s legs.
A reptile tail carries a number of different muscle groups, all packed around the central core of the spinal column. One of the larger muscles is the M. caudofemoralis, which is found on most tetrapods, but was especially important to the speed of an upright theropod. The muscle started just behind the hips, tapering back towards the tip of the tail. Packed on either side of the spine, it would pull the upper leg bones backwards when it flexed. As the leg swung back, the animal was launched forward, with the tail muscles essentially providing extra oompf in each stride. So as tails became more muscular in this way, it made the theropods’ leg movements powerful and efficient. Over time, tails became a bigger part of this bipedal locomotion while arms became less important. To further streamline these bodies, the arms of many theropods were reduced in size, letting the predator better specialize in launching its mouth at prey as quickly as possible.
Less muscular mammals
As hand-dependent mammals, this all seems pretty foreign to the human experience. We’re better runners than we give ourselves credit, but the fastest runners most of us think of today do so on four legs, such as horses or cheetahs. Aside from demonstrating that there isn’t a single “right” answer in evolution, fast quadrupeds is largely a product of mammal evolution. When early mammal ancestors were more interested in hiding in holes than chasing down prey, they didn’t need muscled tails, and more or less gave them up. Forelimbs were instead emphasized to make digging easier, and tails were sometimes reduced to nubs, which made navigating tunnels all the easier. At this point, some mammalian tails have obviously become stronger again, but none help power the rear legs like they once did, maybe as far back as the Permian period 252 million years ago.
It’s also worth noting that modern theropods basically gave up this tail-powered locomotion as well. In the case of birds, tails were likely reduced to a few vertebrae to shed weight and make flight easier. Locomotion was then more dependent on strong forelimbs in the form of wings, making feathers a completely adequate replacement for earlier species’ leg-pumping musculature.
Source: How dinosaurs learned to stand on their own two feet by Katie Willis, University of Alberta