Well, what reasons are there to invent Gods?
I think it's a combination of two evolutionary factors. 1. We have the ability to recognize intelligence in other beings. Not just humans but animals, and, with a bit more creativity, it's not hard to imagine it in inanimate objects and forces of nature. 2. We evolved an empathy that allows for emotional connections with other beings, most specifically for small-group, next-of-kin type stuff, but that, too, has expanded to include the ability to love pets and feel compassion for even inanimate objects - favorite tools and clothes, for instance.
Put those two together--assumed intelligence plus an emotional connection--and it's easy enough to invent a tree spirit or thunder god, and once you've got those religious thought can continue to develop on its own to get you things like monotheism.
I'm not positive, but I think Bruce Schneier's "Liars and Outliers" first suggested this to me.