Human's are a pack species. We survive and thrive when we live in groups, and groups need a leader to maintain order. The pack leader is someone who can guide us and protect us against the unknown. In the past, the danger came from wild animals and other humans. In the modern world, that danger comes from things like death and disease. But even presidents, kings and prime ministers can't protect us from everything, so an omnipotent pack leader was born (a.k.a. god). God can explain the unexplainable, protect the indefensible and heal the incurable. Granted, I think the origin of god (and deities in general) is a much more complicated subject, but I do think that's one of the reasons why it persists through time. People don't like to think of themselves as small (in comparison to the universe) and they don't like to think that they are vulnerable. Yet we are both. Believing in god is putting a pack leader in the driver's seat of a car that can never be driven. It makes us feel safe and secure; a defense mechanism against the dangers, and the vastness, of existence.