I agree, but I think it's more nuanced than this: smart people can regularly be observed being unable to think critically during conversations (particularly on certain topics), yet the same people can think critically writing code. Assuming this is true (it's certainly quite true), it seems to me that differences between these two contexts causes the mind to behave differently.
At the time I was forced to take the course, it felt pointless to me, but after reading Thomas Kuhn’s book (SoSR) several years later, I can look back and connect the dots.
Learning about the history of science was meant to punctuate a widely held myth, that our civilization has been progressing linearly and cumulatively. Kuhn found that the way textbooks are written create the illusion in the mind of the student that scientific advances have been linear and cumulative, rather than being interrupted by paradigm shifts, as old approaches are abandoned in favor of new ones.
Nuance comes down to being able to view an issue from multiple perspectives, that in a lot of situations, there is often more than one (correct) answer.
Or the most potent disciplines: epistemology and logic. I believe epistemology and logic when combined with decomposition (something programmers usually have excellent capabilities in) make it fairly easy to determine where the weakest links in any given argument lie. A big problem though (in addition to the fact that we don't teach this sort of thinking): the human mind seems to have evolved to have an extremely strong aversion to exercising these skills on certain topics (something barely taught at all in western curriculum of any kind, the closest being psychology, which doesn't get a lot of respect from most people).