It is quite amusing that the dominant religion in most countries was forced upon the ancestors of the people practicing that religion today. In South Africa, Christianity has become the most common religion practiced among the black people. Before the white man came to Africa, the different African tribes held different views on life, death, the afterlife, god and so on - very different to Christianity. When the white man came and eventually enslaved the black man, the white man began forcing the black man to believe what HE believed. The first generation of the black man resisted, but when the new children of the black man were told to be Christian it was easier for them. As each new generation came forth, Christianity became the new norm for the black man's faith. In present times, it is common for black people to practice Christianity half-and-half with their cultural beliefs and customs - but every day the cultural customs fall away a little bit more - soon all of South Africa will be westernized (and this was not even accomplished by slavery - it all happened in very covert and underlying themes...)
Look at the history of a country - chances are that there were conflicts around religion at some point and what often happened was that one of the religious factions would gain majority support (or even fanatical support) and force all of the people to convert to that religion (or religious sub-set). History books and other sources of information have this tendency of trying to make this forced conversion sound quite nice compared to the probable reality - they will use the word "accepted" instead of "submitted to the pressure of certain religious enforcers".
Religion has certainly been the biggest source of conflict and misery in the history of humanity - why we haven't changed the way we think around it makes no rational kind of sense - but we aren't really a rational kind of species. There is good and bad in everything - what I mean is that there is something you can learn and other things you can simply discard. Religion should be treated in this manner, where the good principles that we want to see in our society are lived and all the other stuff that we don't actually want in our own lives we should discard.
Easier said than done, certainly. The problem, as always, is that everyone wants to be right, everyone wants to have their way. There is a simple solution to this, but it requires that each person be willing to let go of their ego and be objective in their considerations. This is not usually something that is easy for someone to do - even if they're 100% willing and keen - the grip our minds have on us is strong (but not unbreakable). Like with so much in this world, perseverance, discipline and responsibility are key ingredients to moving through ego.
Will religion endure? Will we keep it alive? There seems to be a drive for people to believe in something, to focus on some idea out there - probably as an unconscious tactic to not look at themselves. It's always about finding some "teaching" to live by, something that tells you what to do so that you don't feel entirely responsible for your actions (or lack thereof). Well, at least that's one aspect of it. Another aspect is that we want to believe that there is some kind of divine purpose guiding life, guiding US and giving us a purpose. Maybe so that we don't have to give ourselves purpose? Anyone who has done this will tell you that it is very contrary to how most people think and live. To give yourself a purpose and actually live it in every moment of your life is very different to constantly being told what to do and being given an endless array of free choice to keep you tongue tied and tripping over your own self doubt.