“[Religion] is the opium of the people,” said Karl Marx. This remark has been widely quoted and often misunderstood. While religion is an illusion that provides escape from the real world, it emerges from conditions that require illusions. There’s a well-established inverse correlation between societal health and religiosity, lending some credence to Marx’s view. But religion isn’t just an opiate. Marx’s speculations on the social function of religion discuss why it emerges, what it provides to adherents, and how religion prevents the improvement of the material world around us.