A lot of modern people think of religion as some combination of fairy tales that provide meaning and comfort paired with some moral principles to follow. That is a very poor assessment of what it actually does, though.

Religion is better understood as a form of long-term, multi-generational communication. I would call it "tradition", but tradition is too broad of a word to really capture what is happening in religion.

The first and most foundational thing that religion does through multi-generational communication is organize and unite a group of people. It gives them a shared story and a shared identity tied to that story. This is very, very important for more reasons than just the obvious one of "we do better when we get along." The main reason this matters is that it takes many singular, physical organisms and it transforms them into a single, social organism that, at least in the context of the story, act as a singular entity.

This is critical because what it does is facilitate the evolution of the social group. You can't really identify what drives a group of people forward by testing them one by one. You have to test them in as a single unit. And by combining them into a singular, united organism and bringing them into conflict with other, similar organisms, you can establish fitness.

So let's take an example: let's say you have group A and group A has a religion that teaches first and foremost that the greatest good a person can accomplish is to achieve some sort of personal, spiritual enlightenment. Now let's say we have group B and group B has a religion that teaches first and foremost that the greatest good a person can accomplish is to become powerful enough to challenge the gods and obtain glory. Then let's say we have group C and group C has a religion that teaches first and foremost that the greatest good a person can accomplish is to truly, deeply love their neighbor as themselves.

So we have these three groups and let's say they come into conflict over the finite resources available in their region of the world (as people groups tend to do). Their foundational religious beliefs about where they fit as people and as a group into the universe is going to affect every aspect of how they organize their society. One of them is going to organize in a strict hierarchy and that will carry benefits and drawbacks. Another will organize in less centralized fashion, also carrying benefits and drawbacks. So on and so forth.

When they meet and come into conflict, the organizational structures they built based on these religious ideas are going to determine who wins and loses. One is more efficient than another. One is stronger. One is weaker. Invariably, what we have is a massive test of fitness between not just people, but social orders and the religions that structure them.

So now let's back up and look at this over time. You have millions or even billions of people that are born, live, and die throughout history as part of all these different people groups. The context of their conflicts and the resources they fight over are going to shape who wins to some extent, but in the long term, you are going to start seeing winners and losers. The fitness of one belief system is going to repeatedly win out over another until what you are left with are what we call "world religions", i.e. religions that have tested their fitness against multiple other models and found some measure of fitness.

So what is happening when someone tosses out their religious context? They are essentially saying "I understand this organism perfectly, I know its strengths and weaknesses, and I know better than the process of natural selection as to what is a better way of living."

That's a pretty bold claim. And if you consider the complexity of social organisms, how sociology as a field has barely even scratched the surface of what it means to understand people in groups, it's a stupid claim as well. It's not a simple matter of reverse engineering religion and replacing it with reason or some bullshit like that anymore than it's a simple matter of replacing a human brain with a computer. You're dealing with a complex, evolved system that has proven fitness.

So when we say something like "our society has thrown the baby out with the bathwater" we are referring to things like understanding a balanced position on violence. But we are also referring to a million other nuanced things about religion that provide untold advantages to the social order.

Hope that answers your question.

Also, go to church. Humanity needs you to go and God loves you.