When studying past civilizations it had been discovered that some ancient societies worshipped many gods. After digging deeper into some of these religions it was found that they had believed that these gods had great powers and that they used those powers to control all natural functions. They did not understand how the natural world worked so they figured that it must be gods that were controlling it. So my question is this: if modern people know that the reason ancient people believed in gods was only to help them understand their world, how does modern man justify believing in a God when science has given us most of the answers on how our world works and does not seem to support the idea of a God?
How? The same way modern people believe in political parties. Religion and politics are different aces from the same deck of cards. One has a dogma, the other has a party platform. Both subsist on selling fear, hope, and empty promises of a better life. Both demand unquestioned loyalty, etc.
Have read some reasonable comments here and I do believe there is not one reason but many. One that I did not see mentioned though, and I consider near the top of the list is POWER. I think people need to feel they have some power over their world and if you can work with the, and get help from, a supreme power of the universe they have power.
One has to be careful of scientism and the dogma that "science has answered most of our questions" because as a scientist myself, I can tell you that the number of unresolved questions in the world outnumber the number of answers.
It is because of this understanding that most people (68%) see no conflict between their religious beliefs and their scientific knowledge  and why a small majority (51%) of scientists hold onto religious beliefs in the USA  and across the world .
The idea that there is conflict is mostly perpetuated by non-scientists, atheists and theist alike, in an attempt to "bandwagon" people into thinking that they have science on their side when in fact they don't.
Many people are innately gullible. That seems like something that evolved to help us to stay in groups. But by not being constrained to facts or truth testing, religions can make up whatever kinds of stories that sound good to people. Religion will always have that advantage over truth.
Well, from my experience as a child and son of a deacon in the church: What you are taught and have hammered into your brain on a daily basis becomes your version of "reality," even if it feels wrong to you. A child's mind is so malleable, coupled with the idea that your parents "know everything" when you're little, you are subconsciously brainwashed from the start. I was lucky enough to meet friends and a particular professor in college who welcomed my questioning of the bible and offered input and recommended readings to free my mind. Upon realizing the errors in the bible the blinders came off. Sadly, not many people are willing to even explore the concept (or maybe incapable) of thinking otherwise bc the religious trauma runs so deep that their critical thinking skills become nonexistent.
In a word, I think a lot of people really believe in magic, even if they don't see it that way. The insecurities of mortal existence can make some of us desperate enough to believe almost anything.
How many religious folk in the modern world think that the critical difference between themselves and ancient peoples long vanished is that they worship "the one true God?" Probably more than a few.
Parse religion strictly as a meme, an idea trying to survive by spreading from one brain to another, and what characteristics would be beneficial? Promising a reward that can't be disproven makes sense. Insinuating doom (that also can't be disproven) for disbelief seems like a pretty good choice too.
So, are core beliefs especially subject to Alexander Pope's recommendation on learning, "drink deeply, or not at all?" I don't think so. What is more critical than knowing a great deal about how the natural world really works is to understand that what is known was arrived at mostly by following the evidence wherever it led, even when what we found was not comforting, and revising our picture of reality when we achieved subsequent breakthroughs. Knowing vast amounts of detail is less important than knowing the central principle; an idea must be formulated such that we can prove it false, and if the idea survives repeated challenges we have solid evidence it's actually true. That's where we are in areas like atomic theory and the genetic code.
We also need to recognize that changing the details of what we know is normal, because we are still clarifying our picture of reality. We no longer have the perfect picture of reality we made up when all causes were opaque, but instead now have some details that are useful, that seem to reflect reality, and that we can continue building upon. The modern mindset requires some belief too, but it's a belief in following the evidence, and skepticism is just as important as belief.
I still remember, as a child, being taught the song "Jesus loves me, this I know, for the Bible tells me so". The next verse talked about how children especially are under his protection because "they are weak but he is strong". It would be very comforting to accept the message that there's a supernatural, omnipotent protector right now looking out for me. I think that's part of the answer; as Wilhelm Reich postulated, people often seem to desire a dictatorial protector to run their lives, and a God person would fulfill that role. However, I accept personal responsibility for my life, and I know that scientifically there is almost certainly no God. (I wouldn't mind a Goddess, though...)
Because they feel small and want to think they are not ultimately in control of their life. Organized religion remains to try to control the crowd and to extort money from them.
Trump's 35%-40% approval rate shows you that some people will believe anything even though they know they are being lied to! I view that as more of a mental deficiency than an actual chosen belief!
I work in Haiti, and have lived in Africa, and many small Caribbean islands - so I'm not discounting the power of religion in conservative societies - most of which have very few educated people, high illiteracy, and a level of superstition (folk-beliefs) that makes the church(es) seem like a protection, an advantage in life both socially, spiritually, economically... these people have to be extremely brave and iconoclastic by nature to break the bonds. Logic and understanding the dogma of that church/cult doesn't come into it much if at all.
Science hasn't proven whether god exists or not. When people talk about god they are usually talking about one of two different concepts.
The God of the universe, or the local God that supposedly interacts with peoples lives, rewards and punishes, talks to people, cares about the sex lives of humans, and likes to write books are the two.