Why Some Brilliant People Believe In Gods

Why is it that some of the greatest intellects believe in a god if gods don't really exist? Let's take
Isaac Newton for example. He is well known for confessing a belief in a god but if you take a closer look at his writings you will notice that he never invokes the existence of a god when talking about subjects he was knowledgeable about. He only invoked a god's existence when faced with something he could not explain and was not educated in. More specifically, Newton had no clue how planets could keep in orbit through natural means so he assumed the only possible explanation was that a god was keeping their orbit stable.
A century later Pierre-Simon de Laplace, a French astronomer and mathematician, solved Newton's dilemma of stable orbits proving that there was no need to invoke a god at all. As it turns out scientists like Isaac Newton only believe in a god because of the knowledge they lack, despite how knowledgeable they are in their particular field of expertise.