I actually believe that humans are born with a tendency towards religion.
If you don't understand how **** works, it makes sense that you would invent something to explain it. That's the start of every religion.
Early humans had no idea about their true nature, so they assumed someone created them. Once they figured out they lived on a planet, they assumed something created that, etc.
Unfortunately (or fortunately, depending on your side) all that leaves religious people is a god of the gaps.
It's not so much a tendency towards religion, it's a tendency toward fantasy and surprisingly enough that aspect of humans is there as a natural defensive mechanism.