The dinosaurs lived during the Mesozoic Era, which was divided into the Triassic, Jurassic, and Cretaceous Periods. Many of the iconic dinosaurs that we know and love such as Tyrannosaurus rex and Triceratops lived at the end of the Cretaceous while others such as Stegosaurus and Apatosaurus (formerly known as Brontosaurus) lived 80 or so million years earlier in the Jurassic. I used to picture all the dinosaurs co-existing simultaneously but the time span separating Stegosaurus from T. rex is larger than that between T. rex and the present! Dinosaurs also weren’t the only creatures alive at that time, just the most dominant ones. Technically, the term dinosaur only applies to land-based reptiles with certain features. The avian reptiles, such as Pteranodon, or the marine ones, such as Plesiosaurs, resembled dinosaurs but were not classified as such. Aside from those dinosaur-like animals, there were also invertebrates, fish, sharks, and a class of animals called Synapsids, defined by an opening in the skull behind the eyes, from which all mammals are descended.
Synapsids were small marginal creatures during the Mesozoic but came to dominate the land after the dinosaurs went extinct at the end of the Cretaceous (the KT extinction event). The consensus theory is that a large asteroid or comet strike in the Yucatan set off fire storms, seismic events and a cloud that blocked sunlight for up to a year. This caused plants to die globally, which collapsed the food chain.The only survivors were creatures that could go deep underwater or bury underground and survive long periods with little or no food. Survivors of the KT extinction include some fish, small sharks, small crocodiles and other cold blooded reptiles, small bipedal theropod dinosaurs, of which T-Rex is a member, and small rodent-like synapsids.
If the KT extinction event was a transient perturbation then it is reasonable to expect that whatever it was that allowed dinosaurs to become dominant would remain and the surviving theropods would come to dominate again. But that is not what happened. Theropods did survive to become modern birds but aside from a few exceptions, most are small and almost all are avian. Instead, the Synapsids came to dominate and the largest creature to ever live, namely the Blue Whale, is a Synapsid. Now this could be purely due to random chance and if we played out the KT event over and over there would be some distribution where either Synapsids or dinosaurs become dominant. However, it could also be that global conditions after the Cretaceous changed to favour Synapsids over dinosaurs.
One possible change is the atmospheric level of carbon dioxide. CO2 levels were higher than they are today for much of the past 500 million years, even with the recent rapid increase. The levels were particularly high in the Triassic and Jurassic but began to decline during the Cretaceous (e.g. see here) and have continued to decrease until the industrial revolution when it turned upwards again. Average global temperatures were also higher in the Mesozoic. The only other time that C02 levels and global temperatures have been as low as they are now was in the Permian before the Great Dying. During the Permian, the ancestor to dinosaurs was a small insectivore that had the ability to run on two legs while the dominant creatures were none other than the Synapsids! So, mammal-like creatures were dominant before and after the dinosaurs when CO2 levels and temperatures were low.
Perhaps this is just a coincidence but there is one more interesting fact to this story and that is the amount of stored carbon (i.e. fossil fuels) has been very high twice over the past 500 million years – the Permian and now. It had been believed that the rise in CO2 at the end of the Permian was due to increased volcanism but a paper from 2014, (see here), speculated that a horizontal gene transfer event allowed an archaea microbe to become efficient in exploiting the buried carbon and this led to an exponential increase in methane and CO2 production. The active volcanos provided the necessary nickel to catalyze the reactions. Maybe it was simply a matter of time before some creature would find a way to exploit all the stored energy conveniently buried underground and release the carbon back into the atmosphere. The accompanying rise in temperatures and increased acidification of the oceans may also spell the end of this current reign of Synapsids and start a new era. While the smart (rich?) money seems to be on some sort of trans-human cyborg being the future, I am betting that some insignificant bird out there will be the progenitor of the next dominant age of dinosaurs.