I have a tendency to take a more social view of the matter, though I do agree somewhat with previous points.
As pertains to the exercise of Religion, I believe its primary (pragmatic) function was to serve as a means of social gathering with like-minded people. If we assume that to be at least partially true, then the indoctrination of an individual into a particular overall Religion, or perhaps, a specific denomination of a greater general Religion could be as much a component of peer pressure and the desire to fit in at least as much as anything else. We have seen this occur all throughout history by means of social ostracizing of those who were not keen on subscribing to the prevailing Religious views of that era and/or area, and we see that still in some areas today.
Furthermore, there was simply not as much information out there when Religion was at its peak largely owing to the lack of electronic means of communication. The obvious result of that is, even if an individual would have otherwise had beliefs contravening the prevailing beliefs of a given area, that individual either did not know how to express those beliefs, could not find like-minded individuals with whom to share said beliefs or could not find any additional information of or relating to those beliefs. In effect, there may have been people who would have otherwise subscribed to a different form of Religion or Spirituality, but were not aware (or did not have access to) any organized means of practice in line with that belief system.
Additionally, the person may just have not known about some other belief systems, in general terms, to begin with.
The reason that we see fewer people identify as Christians (or other proponents of the God of Abraham) is not so much owing to any great failure of Christianity (or other related sects), but rather to the increasingly efficient means of communication and education that we enjoy today. Basically, to the extent that a Religious/Spiritual system is as much about one’s basic moral codes and views on life as anything else, an individual can deliberately seek out alternative Religions and/or Spiritual systems to determine if same are right for them.
Also, we’ve learned that Religious beliefs and a moral set are not mutually exclusive.
Now, you could argue that the information would have been available in physical libraries prior to the development of electronic means of communication, (i.e. The Internet) but those modes of learning, even if one believed them, still left a void when it came to people to discuss and share those views with. The Internet, to a large degree, has solved that problem as individuals can now seek out and readily communicate with others who subscribe to their belief systems, whether they be Religious/Spiritual in nature or not. This is also true when it comes to political views, whereas at one time in the United States there was something even more closely representing a political dichotomy than what we have today. In other words, to the extent that, ‘Third-parties,’ existed, there was no efficient means by which they could advance their ideas for the consideration of others.
Ultimately, we went from being sheltered to not being sheltered. However, that does nothing to change the fact that Religion/Spirituality often fulfills the purpose of increased social interaction for many people.