Consider this - in the early 1800s, astronomers noticed that the orbit of Uranus wasn't matching their predictions. Some of them at the time proposed that we would need to modify the formulas used to describe orbital motion, that gravity behaved differently in the far reaches of the solar system. Others proposed that there was a yet unseen planet (or a "dark planet") whose gravity was disturbing the orbit of Uranus. Twenty some years later, and the second group turned out to be right. We now call that dark planet Neptune. Or for another example; in the late 1920s Pauli discovered that beta decay did not seem to obey the laws of energy conservation. So he proposed that there was an extremely hard to detect particle (not too different from most dark matter proposals today) that would make the math add up right. It was several decades before we directly detected that particle; we call it the neutrino.
Of course, on the flip side, there have been times when new theories have been needed, like how when people noticed Newtonian gravity didn't describe Mercury's orbit well, but Einstein's theories matched its path more accurately. Various modified gravity theories have been put forward as an alternative to the dark matter theory, to explain things like the rotation curves of galaxies acting strangely. Yet a variety of observations seem to to fall more on the dark matter side. For example, the bullet cluster (and some others) show gravitation lensing that is disconnected from the visible matter. Or there have been two galaxies discovered that DO have rotational curves matching what our regular gravity theories predict. That is really hard to make work with any modified gravity theory, but with the dark matter theory we can just say those galaxies happen to not have much dark matter. And on the flip side, there is a galaxy (Dragonfly 44) that from gravitation lensing seems to be as massive as the milky way, yet is only 1% as bright. Easy to explain with the dark matter theory, but difficult with the modified gravity.
If Machiavelli were a hacker, he'd have worked for the CSSG. -- Phil Lapsley