The beak was like nature's Swiss Army knife because it provided many tools in one unit.
Beaks were "an evolutionary innovation" for dinosaurs, according to new research.
Dinosaurs and their later bird relatives used their beaks for grooming and for seeking out different types of food.
Most predatory theropods were actually herbivores, so carnivores like T. rex were rare and primitive.
The emergence of the beak on dinosaurs was "an evolutionary innovation," according to a new study that found this seemingly simple trait is like nature's Swiss Army knife because it functions as many tools in one.
Over time, many dinosaurs replaced their toothy grins with beaks to aid their transition to plant eating, according to the new study that is published in the latest Proceedings of the National Academy of Sciences.
"As modern animals such as birds and turtles demonstrate, a beak can be adapted to function for a variety of purposes from processing different food types -- nuts, fruits, leaves and meat -- to grooming and other behaviors," co-author Lindsay Zanno told Discovery News.
"The evolution of a beak was an evolutionary innovation because it was a new anatomical structure that hadn't been available to theropods before, therefore it provided a new means for theropods to process foods and engage in other behaviors that they hadn't had access to up to this point," added Zanno, a researcher at the Field Museum.
She and colleague Peter Makovicky came to that conclusion after collecting dietary data for theropods, a group of two-footed dinos colloquially known as "predatory" dinosaurs. The group includes some famous flesh-eaters like Tyrannosaurs rex, which turns out to be a very primitive, old-school dinosaur.
"Carnivory is always rare relative to herbivory in animal communities because food availability becomes more scarce as you move up the food chain," said Zanno. "It takes a ton of plant material to sustain a lot of herbivores and a lot of herbivores to sustain a few carnivores."
Many of T. rex's closest relatives were therefore content with vegetarian fare, according to the scientists. The researchers looked at evidence that included fossilized dinosaur dung, stomach contents, tooth marks, gastric stones and even two dinosaurs locked in the throes of combat. All helped to reveal what theropods ate.
Zanno and Makovicky found nearly two dozen anatomical features that are linked to plant-based diets.
Zanno explained that important traits associated with herbivory are tooth loss, beaks, different tooth shapes (leaf, peg conical), multiple tooth types in one animal, tooth elongation (including rodent-like incisors), and long necks.
The researchers believe beaks evolved at least five times in theropods alone. Other dinosaurs, like ceratopsians and hadrosaurs, had them too.
"The ancestors to birds had teeth as did many early birds, so none of the toothless forms are directly ancestral to birds," Zanno explained.
The researchers conclude that "the ancestor to birds was likely to be at least omnivorous," which raises some interesting questions. For example, the scientists hope to find out if the shift to a more vegetarian diet led to the evolution of four-winged gliding and flight.
Thomas Holtz, director of the Earth, Life and Time Program at the University of Maryland, told Discovery News that he agrees that T. rex was a more primitive dinosaur that "inherited the ancient theropod condition of meat eating," and that many other T. rex relatives were either 100 percent vegetarian or transitioned from eating large prey to eating insects.
The new look at "predatory" dinosaurs also reveals "that the unquestionably carnivorous dromaeosaurid 'raptors' (such as Velociraptor and Deinonychus) evolved from plant-eating ancestors," Holtz added.
Living birds include carnivores, herbivores and omnivores, so their diversity and complexity today appears to be echoed in their distant dinosaur past.