Gods are part of people's desire to know how the world works.
One of the ways that people explain how the world works, is to say that God or the gods make this happen. Or you could say that the gods are a way of talking about things that happen, that are hard to understand or hard to talk about. So the Sumerians said that there was a sky god, Ur, who controlled the weather, and a fertility goddess, Ishtar , who controlled whether things grew or not. And the Egyptians said that there was a god, Thoth , who decided what happened to you after you died. And the Jews said that God had created the world .