This would also explain Julian Jaynes’s seemingly-crazy theory that ancient people experienced their gods as auditory hallucinations. If society tells you that some of the thoughts that you hear in your head come from gods, then maybe your narrative of the self just comes to assign those thoughts as coming from gods.
Speak of the devil.