In Sumeria and Babylon the priests were in charge of water engineering, and had to construct elaborate aqueducts to keep crops irrigated, and these works required constant supervision.
Religion was created to anoint the local King with a divine right to rule, while giving his High Priest a ceremonial tradition stretching back to creation. By building the big temple, they were able to sweep aside the privately-controlled shaman traditions from each tribe. But they also must have co-opted those traditions as much as possible. Costumes and rituals provided the sense of enchantment required to keep the populace happy and productive.
Egyptian creation myths seem influenced by the Sumerian one, as the same basic pantheon of Gods is put into play. However, the biggest difference in Egypt from Sumeria and Babylon is that no aqueducts are necessary because the Nile delivers the needed water when it floods every season, and leaves a nutrient-rich soil behind when it recedes.
In the beginning there was only Nu, dark, watery abyss of chaos.
Out of Nu rose Benben. (A great earthen pyramid believed to have happened near Thebes.)
Above Benben, Ra, (Sun God) was born.
Then Atum was born, King of all Gods, who self-created the God of Wind and Goddess of Fertility.
“I had union with my hand, and I embraced my shadow in a love embrace; I poured seed into my own mouth and I sent forth from myself issue in the form of the Gods Shu and Tefnut”