Explanation and Mystery
There are really two core views of religion in society today. One group, consisting of fundamentalists and many atheists, sees religion primarily as an explanatory device for the world. Moral guidance is part of this, but only part - for these people religion also contains Truth about all human experience and the workings of the universe. I've seen this in my field - try bringing up the idea that the Old Testament is one primary source for ancient history among others in a class of people not quite prepared for the idea, especially if they're still in high school. Some people I've met - and socially I'm nowhere near serious fundamentalist territory - view the question "Do you believe The Bible?" as an all-or-nothing proposition, and an assault on one part of it, even whether someone named Ham really had a son named Canaan, is an assault on all.
The other group - and I admit this is not a dichotomy across all society so much as a description of two common types of people with lots of other lying between and around them - sees empirical evidence and human knowledge as the main explanatory device, with God as one of the mysteries we struggle to understand. For them, a belief in evolution doesn't challenge their belief in God, it simply shows that when He created the world it was a more complex process than the ancients who first struggled to understand Creation thought it was. The Bible for these people is not so much a tool to explain life, though it certainly does some of that, especially in the moral realm, but rather a record of faith and writings by people who were in a position to understand a great deal, such as Paul and other early Christians.
Now it is certainly possible to simply move from being a "religion explains" person to a "religion is explained" one, but first you have to know of and understand the second position. I'm not convinced that happens as often as we might assume - if it did, there wouldn't be so many people convinced that a belief in evolution is is tantamount to a rejection of God. Maybe it's not that simple - I think it more likely that people come to question many elements of the fundamentalist worldview during a short period of time and gradually lose all religious belief that way. But you can see it happening every time someone declares themselves an atheist and justifies it by demanding to know what sort of God would demand all the stuff in Leviticus.
That last also explains why in my theological views I take the position that claiming The Bible is the inerrant Word of God is not only wrong, but probably dangerous, and in any case I don't see why in Christian theology we need an inerrant holy text to represent God's Word when the first chapter of the Gospel According to John clearly directs us elsewhere for that. (Well, I understand on the historical and sociological level, but not in terms of theological argument.) That, however, is a discussion for another time.