I believe, but cannot prove, that the mind is evolving, and that ideas become accepted, and old ones rejected, when the "collective mind" has evolved so as to be able to accept the new idea.
Hence , speech came about, then writing and eventually the mind evolved so that we could even grapple with philosophical questions.
The time had come for the "Golden Rule" to be accepted, so the Christian religion gave impetus to this old idea.
So, we seem to get a consensus on an idea whose time has come, so we all agree now that Slavery is wrong. (By all I mean the majority, as it is still in use , not all humans agree), we agree that Apartheid and Segregation and Racism are wrong, slowly we are accepting that the former treatment of Gay people is wrong, and so on.
I think that we are moving in to a time that will see the "collective mind" rejecting myth, legend and fairy stories as a basis for belief. Therefore, "Religion" as we know it will be gone. (Not belief, that will always be with us, I hope, belief is the basis of progress)
Mankind will be incredibly better off then, religion has been such a brake on human progress, scientifically and morally that once that restraining influence is done away with, the seeds of which we see sprouting now, humans will progress in leaps and bounds.
Religion did not want to admit a Heliocentric system in which our Earth exists, it still does not want us to use birth control, it wishes to outlaw abortion, stop stem cell research and so on, it wishes to continue the ignorant and immoral treatment of Women and our Gay friends etc etc
Mankind will look back on our Era, with its benighted religions and its lack of morals i.e going to war etc much as we look back on pre-human times.
Spiritually and Morally we are at present the equivalent of the first Hominids. When we reach the point of no religion and society has progressed as outlined, we will be the equivalent of Homo Sapiens.
The "collective mind" has a way to go, but if we do not go with it, if we persist in sticking to the old rubbish, religion and outdated morality etc, we will go the way of the Neanderthals.