When someone says that a lack of religion leads to a lack of morality, what they're necessarily really saying is that they're so deeply sociopathic that they not only can't reason morally, but can't even envision the possibility of doing so. They're effectively stating outright that they can't even imagine arriving at sound moral judgments through the application of reason, empathy and concern for others, and that the only way they can even conceive of morality is as a set of rules laid down and enforced by some enormous daddy figure who's going to punish them if they break them.
It gets worse, because that’s what people use to justify the argument that people being evil is a part of human nature. Because they genuinely believe that being evil is the default state of humans despite centuries of evidence otherwise.
It's also the reason that religious people can contentedly do horrible things - because they have no ability to make moral judgments on their own, so if their religion tells them that something that anyone with even a minimal ability to reason morally would recognize to be obviously wrong is actually right and proper, they just slavishly believe that it's right and proper.
Well... Some cannot make those judgements but some can. Those who can, and some who are told to do or believe things that contradict their sense of morality will refuse to do so. And end up having to question their leader, church, even their entire belief system. I'm speaking from experience here.
I always say that the idea of civilised society is something we tell ourselves to make us feel better about the fact that we're living amongst wild animals.
There are a range of people from altruistic to greedy sociopaths. And few if any are so simple that "good" or "bad" is a sufficient descriptor.
Humans evolved to be cooperative, on average, only to such a degree to enable us to survive. On the surface we can mostly not maim and kill each other enough to work together on things.
But we have many competing motivations and instincts. We aren't far enough removed from our violent ape ancestors to my taste. As one can see by reading the news on any given day.
Wars, capitalism, climate change, rape, murder, torture, religious extremism, mass starvation while we throw out food because someone failed to buy it, etc.
I hear this over and over but I don't think it's universally true.
For me, when I was still a believer, I thought and said (at one point) that religion was needed for morality only because I didn't think too hard (as is true for many religious folk) and also because if people could be decent and moral without religion it called into question some fundamental tenets of Christianity.
At some point not long after I said this to someone, who called me out on it, I realized this idea was stupid and was easily disproven by the many good, non-religious people I knew. That was one of many realizations on my path to deconversion.
Another was encountering religious people who seemed not to have any empathy (or who had been brainwashed into having none). So probably some make that claim who are sociopaths. Anyway I was horrified by some of the statements and attitudes and that prompted further thinking.
No, they said that someone could believe that morality without religion is impossible not because they are a sociopath, but rather because they haven't thought "too hard about it.".