Gods were created by people to explain nature... before science was invented...
Thunder & Lightning, Earthquakes, Tornadoes & Hurricanes, Floods, Drought, Volcanoes, Solar/Lunar Eclipse, Diseases & Pestilence, Locusts, etc, etc, etc...
We still refer to these today as, "acts of God" (though we know better)
God was created to "fill the gaps of knowledge"... anything unknown was the work of a god...
To me, "God" == "Fuck if I know"
"God did it" = "Fuck if I know who did it"