I'm studying to be an Anthropologist and I've always had this question but I cannot get a definitive answer. Almost every ancient civilization I have studied, whether it be in the Old or New World had some sort of religion. Why did all of them think that there was a higher power or powers? Why is it so consistent throughout the world?
We can't know for sure, because our information is so scanty about very early civilisations. The two obvious possibilities are:
Humans have an innate tendency to invent explanations for things they don't understand, and to treat them as having personhood.
Rather than being innate, this happened to be a cultural value among early humans, and has been passed down to us since then.
It's extremely hard to distinguish between these possibilities at this distance in time. While experiments could be designed to distinguish between them, they would involve bringing up newborn children without human contact. This is considered profoundly immoral, and thus the experiments should not be done.