I was maybe 14 or 15 when I first read Frank Herbert’s Dune. In college I discovered the sequels–all 5 of them–and I’ve returned to them a number of times since. Herbert’s sociology of religion shines in certain ways. The average sociologist of his time is a fairly woodenheaded materialist who thinks of religion as humanity’s first and worst answer to being lost in a perplexing cosmos, an ill-fitting patch pulled over a waning ignorance, soon to wither away before the growing light of Science. Herbert knew better — he understood that religion is one of the fundamental driving forces of human society, and it’s not going away; in fact the opposite: the more humans explore their potential, the more powerful religion is going to get. His explorations into the human potential movement only took him further in that direction. The theme is implicit in The Santaroga Barrier, touched lightly in The Dosadi Experiment, and explored rather thoroughly in the Dune universe.
What Herbert fails to explore is the possibility of genuinely supernatural elements operative in religion. He can countenance humans shaped by extreme training (The Dosadi Experiment, the Sardaukar legions) and even radically transformed by millennia of selective breeding (the Guild Navigators, the Tleilaxu, the various products of Bene Geserit breeding programs, the children of Siona). But as close as he gets to a genuinely *other* presence is the Caleban race of Whipping Star and The Dosadi Experiment, and he situates the Caleban within the ConSentiency universe (which is full of aliens, as opposed to the Dune universe, which has none) as one more alien species, perhaps a little stranger than most.
Which is to say, Herbert takes the enduring presence and power of religion seriously, but he treats it as an entirely human artifact; it doesn’t seem to occur to him that any of it might be real. This dyed-in-the-wool materialist approach could easily be a rational business decision to work within the default approach of the genre. Working with deity in fiction is tricky; even Tolkien (a devout Catholic of immense narrative power) mostly left religion out of his books — and he was writing in fantasy, where he could have gotten away with it.
But Herbert, as far as I can tell, just didn’t take the existence of a deity seriously, at least in his fiction. He viewed religion as a complex force entangled with deep and poorly understood parts of the human psyche, and therefore having an immense power that was a sort of emergent property, greater than the sum of the inputs and therefore capable of turning on even sophisticated manipulators like the Bene Geserit. So he avoids the deus ex machina problem by having no actual gods, and gains some of the plot tension divine intervention can create via that emergent-property power. Far from being puppet masters, his religious manipulators discover they’re riding a tiger and barely holding on.
He’s certainly right that humanly created religious manipulations have a way of turning on the manipulators. He misses that this is because God will not be mocked.