From what I understand, ancient people's developed the concept of God's to explain natural phenomena that could not be explained otherwise in the limited knowledge of those times. Volcanoes--Vulcan, etc, lightning--Zeus, Thor, etc. Earthquakes--Poseidon, and on and on it goes.
That is simplistic, I know, but, it seems one thing led to another with the rise of priests/priestesses, shamans, etc. The ancient gods reflected nature, random, cruel, beneficial, powerful, devastating, life giving, etc.