If we look to "science" today, we can see that it relies heavily on funding. In fact, so much so that "science" can't move without it in some instances. So where we have markets and capitalism, we can see that the thrust of science is driven by such; some "science" is crafted, other "science" is utterly ignored or starved. So even in a superficial way, we can begin to take note as to how our perception of what "science" is has a contextual element from within the society it is birthed from.
Foucault's primary gist, if you can survive reading his work in English, is that the very ontologies are fundamentally flexible and yield to the ideological underpinnings of a given time. One must historicize to see "science" clearly, and indeed he does just this in the work. Others have written since then, including discussions of the recent creation of "science" as we know it today, which isn't nearly as ancient as some would have others believe[1].
It can be an incredibly difficult tome to wade through, but one that comes with significant reward if you manage to parse the work.
[1] https://dangerology.wordpress.com/2013/09/13/steven-pinker-i...