Hi I’m currently reading “microbe hunters” , and I’m not sure about it’s historical accuracy , but it’s a history in the development of microbiology . I understand that this much more science than history , but I was interested in the different attitudes among the scientific community to the idea of germ theory , compared to miasma or any ideas from Galen.
When we present scientific ideas that "triumphed" we tend to emphasize all of the arguments in favor of them that have stood the test of time, and ignore any arguments against them from the time, as well as any arguments in favor of them that we no longer view as positive. It also tends to ignore how "messy" real-world data is, especially in an emerging area of research (we have seen this ourselves in real-time ourselves this year, as the understanding of how the coronavirus changed over the course of the year, from an almost total concern about fomites to a broader fear of aerosolized virus).
We also tend to under-sell the triumphs and utility of the theory that got displaced. So we stack the deck in these kinds of popular accounts, especially those written by scientists or people wanting to glorify science, making our present-day understanding look so much better. This is a persistent bias and one that historians of science and medicine have spent a lot of time trying to work against, because it leads to a very bad model of history ("everyone in the past was a moron except for a few geniuses").
We also tend to present information in a social vacuum, as if people then (and now) just assimilate facts separate from any parts of their lives and society. This misrepresents both the past and present of scientific and medical activity, where our technical understandings are always part of a broader culture which can influence what kinds of explanations we find plausible, which kinds of experts we trust, what kinds of voices get amplified, and so on.
Separately, there are sociological and psychological reasons why communities of experts in particular take a long time to shift their views. A very basic insight of psychology is that once people have an opinion on something, it is very hard to "convert" them to another view. People who do not have an opinion on something can be convinced of a new idea fairly easily, but people who already have a distinct opinion are fairly dug in. Though this can be counterintuitive, this is especially the case for experts, because they are capable of coming up with many good reasons to continue believing what they already believed, and if they have dedicated their lives and work to one framework of thinking it is very hard for them to ever come to the conclusion that this framework was in some major way fallacious. Hence Max Planck's famous dictum: "A new scientific truth does not generally triumph by persuading its opponents and getting them to admit their errors, but rather by its opponents gradually dying out and giving way to a new generation that is raised on it."
Anyway, these are general things to think about. For the specifics of germ theory in the early 19th century, Charles Rosenberg's classic study The Cholera Years looks at this in the context of the United States, by looking at responses to three cholera outbreaks. He argues in it that even after the initial successes of microbe theory, public health and medical authorities continued to use antiquated models of disease when dealing with cholera outbreaks in part because they reinforced both political aims and class biases that they had: they associated cholera with miasma, poor life choices, poverty, and dirt, and were loathe to accept that it could be something as simple as water contamination. Rosenberg argues that the subject position of these authorities played a role in this: the doctors and public health authorities were upper-class and well-off and saw the cholera as sort of an indication of the need of the lower-classes to act more up-rightly if they wanted to survive. Attributing the disease to poor sanitation removed the moral critique, in other words. He also indicates that there was enough medical and biological uncertainty to accommodate people who didn't feel that the emerging evidence from Europe was worth using to overthrow the previous order.
Eventually a "new breed" of public officials and medical authorities, trained in the new model, displaced the "old guard" and the practices and beliefs shifted in the profession. But to go with Planck again, this was less about people's minds changing, and more about the composition of these communities changing over time.
Rosenberg's study is still very useful all these many decades later, and worth a read. On the general dynamics of shifting scientific beliefs, the classic study and place to start (but not necessarily end) is Thomas Kuhn's The Structure of Scientific Revolutions.