“Anything you don't understand, you attribute to God. God for you is where you sweep away all the mysteries of the world, all the challenges to our intelligence. You simply turn your mind off and say God did it.” ― Carl Sagan, Contact
Throughout human history and across many cultures, probably going back to the Stone Age, humans have engaged in a "god of the gaps" mentality when it came to the inexplicable or phenomenon that was not understood. Basically, the god of the gaps argument states that any gap in our knowledge or understanding can be explained or filled by inserting the deity of one's choice as an explanation. For example, ancient Greeks would view the sun "travelling" across the sky. We know it's due to the Earth's rotation. But the Greeks believed the god Apollo pulled it across the sky with his chariot. Thunder and lightning? We understand weather conditions and phenomenon. Ancient Greeks believed it was Zeus and he was probably pissed off about something. Volcano eruptions, earthquakes, ocean waves, seasonal changes, ect., all largely explained and understood by science today. But ancient people across different cultures and times thought it was due to god/s. This is still (amazingly and unfortunately) prevalent today. It's evident when a theist invokes creationism or Intelligent Design, or something along those theistic lines as an explanation for how/why we (humans, Earth, the universe, ect.) are here. It's a convenient and emotionally pleasing explanation to what is otherwise unknown. But such a thought process is intellectually lazy and possibly dishonest.
But God/s is not. an explanation for anything. It's a failure to explain. It's an "I don't know" wrapped in a theological package. Crediting god/s only means the one invoking them actually has no idea and cannot admit that. As Jerry Coyne once said (as cited in 'The God Delusion' by Richard Dawkins, 2006), "If the history of science shows us anything, it is that we get nowhere by labelling our ignorance "God".' But science seeks out questions and the unknown. It doesn't make assumptions and then call it a day. Science practitioners will look for objective, empirical evidence and (hopefully) follow that evidence to where it leads and not to where they or anyone wants it to go. And when science encounters a mystery that it cannot explain, then the correct and honest response is "I/we don't know." But making something up or making assumptions like "God/s did it" just to explain something or satisfy a personal belief or whim is neither correct or honest.
Fortunately, over the centuries, science has advanced and developed tools to further its advancement and information gathering. The result is a much greater understanding of the natural world and why thing actually work the way they do. As the "gaps" in our knowledge become filled, god/s are objectively needed less and less, if at all. Granted, there is still much we do not know or understand and some questions may never be answered. Such mysteries are intellectually stimulating and must be solved, if possible. But not at the expense of intellectual integrity by utilizing an easy, convenient "answer" that is really no answer at all. It's one thing to have and appreciate a mystery. But it's quite another to want to keep it mysterious.