Suppose, then, that Feuerbach’s thesis is true: human beings invented God. Marx’s innovation is to attempt to explain why it is true. Yet should we accept that religion has its source in our misery, and, specifically, the misery of alienation? One difficulty is that even in relatively affluent societies religion continues to exist, even among the more affluent classes. So at least at first sight it is hard to see religion in all its manifestations as a solace. Of course, there are several Marxist-style replies that could be made. First, although some contemporary societies are relatively affluent in material goods, they are still class divided and thus still alienated. So we do all need consolation after all. Second, and distinctly, the existence of religion in class-divided societies is very useful in keeping the workers in check. Distracted by thoughts of heaven, they are less likely to protest about hell on earth. This connects with the theory of ideology. Their social betters have every reason to perpetrate this myth, for their own self-interest. [...]
goes beyond material deprivation imo ... smother any society in material goods and you'll see people start to turn away and toward some form of religion, (correctly) assessing that material goods won't bring any sort of transcendental eternal comfort