What makes beliefs thrive? In this paper, we model the dissemination of bona fide science versus pseudoscience, making use of Dan Sperber's epidemiological model of representations. Drawing on cognitive research on the roots of irrational beliefs and the institutional arrangement of science, we explain the dissemination of beliefs in terms of their salience to human cognition and their ability to adapt to specific cultural ecologies. By contrasting the cultural development of science and pseudoscience along a number of dimensions (selective pressure, cumulative change, sources of stabilization, and types of attraction), we gain a better understanding of their underlying epistemic differences. Pseudoscience can achieve widespread acceptance by tapping into evolved cognitive mechanisms, thus sacrificing intellectual integrity for intuitive appeal. Science, by contrast, defies those deeply held intuitions precisely because it is institutionally arranged to track objective patterns in the world, and the world does not care much about our intuitions. In light of these differences, we discuss the degree of openness or resilience to conceptual change (evidence and reason), and the divergent ways in which science and pseudoscience can achieve cultural "success".