Simply, bone marrow cross sections of dinosaur bones show that the animals were warm blooded. This evidence was always available to see.
They show the animals were more bird-like than reptile.
But as in anything else, you have to know what to look for.
So, if your criticism is that scientists don't always get everything right the first time, every time, then they have to plead "guilty".
But science is all about finding inconsistencies, and using them to improve or replace hypotheses & theories.
That's just what eventually happened in your example.