Science has come a long way - away from things like astrology and alchemy. Kepler played an important role and the same can be said of Renaissance, Reformation and the exploring done in the Age of Discovery.
But it hasn't been a straight line. Important scientists like Newton and Boyle were active in alchemy and a lot of the stories about great discoveries weren't as straightforward as usually told, like in the case of Copernicus, Snow and Darwin.
Below you find simple scheme of how science could work: the empirical cycle. But the development of new theories doesn't always go in a straight line. Looking at the filters in of science to the right you can easily see that many different factors play a role in the acceptance of new facts and theories.
There's a big difference between experimental and historical science. The latter is more descriptive and isn't based on reproducible experiments (though some experiments can be done to show things could have happened in a certain way).
And even in experimental science reproducibility shouldn't be overestimated. A survey by Nature in 2016 showed that many scientists experience problems with reproducibility. The top two factors mentioned by scientists are selective reporting and pressure to publish. See link nr. 7 for the survey.