I think they play off of one another in a way.
I once read the hypothesis that the more popular beliefs are concepts that fit into the few archetypal templates people have (e.g. templates for PERSON, ANIMAL, TOOL, NATURAL OBJECT) but also have one counterintuitive detail that makes them stand out from other prosaic entries in our minds. But here's another interesting point. The more popular beliefs have counterintuitive details that still leaves in place all the rest of the default inferences that go along with that template, so one can still make many inferences.
Ghosts are popular beliefs because they are just like "PERSONS" except for the counterintuitive details that they're non-material and walk through walls. But we still can infer logical actions attributable to other people.
The idea of gods that are watching us and they notice everything we do but then forget them instantly is a rather useless religious idea because it stops any other inferences cold. There's nothing else to go on from there. So it looks like the more popular beliefs and logic seem to work together.
I've got to look deeper into this. Hopefully I've portrayed it correctly.