T. rex was discovered and named by paleontologist Barnum Brown, who actually named it twice.

The first skeleton Brown excavated, he named "Dynamosaurus imperiosus." On the same expedition, he found another, more complete specimen, which he interpreted as another genus and species: Tyrannosaurus rex.

Later on, Brown realized the error in his classification. The differences between the two specimens were just the inevitable result of spending 70 million years under tons and tons of rock.

One would think that Brown would go with the name of the type specimen, Dynamosaurus. However, in the initial scientific paper he wrote on the two animals, classifying them separately, Tyrannosaurus was mentioned first. Since T. rex was classified first, that was the name Brown went with. Such are the eccentricities of biological nomenclature.