For me, it’s related to solipsism.
Solipsism is the belief that I am the only “real” person - the only one with a consciousness. To the solipsist, the consciousness apparent in others is just an illusion. Others are just objects. Maybe they are just human-like robots, fragments of our imagination, or NPCs in a simulation.
Sounds silly at first. But the kicker with solipsism is that it cannot be disproven via reason or empirical evidence. Try it yourself.
So, why am I not a solipsist? I could treat others however I want! I could live without guilt, pity, or other nagging on the part of my conscience.
The sole reason I am not a solipsist - and indeed, whether they realize it or not, I believe this is why most people are not solipsistic - is faith.
Along with most others, I have made a prelogical choice to not only accept the existence of other souls, but to do my best to spare them of unnecessary pain.
Maybe it’s difficult to see how this led to my becoming a Christian. Jesus Christ is, as far as I’m aware, the only holy figure that preached and died for the notion of treating others as ends in themselves. He embodies charity as well as the bearing of another’s suffering - two sides of the same coin - otherwise referred to as “love,” “grace,” or “mercy.” (And in a way, “forgiveness” is also a form of this.)
Nearly all faiths preach the renunciation of earthly desires. However, Jesus goes further: “love thy neighbor,” “turn the other cheek.” He urges us to pursue kindness and mercy relentlessly, as though we were a father to all mankind.
So to summarize: whether we consider ourselves religious or not, being a good person requires faith. We need some kind faith to fill gaps that logic can never occupy. It doesn’t have to be religious faith, but if you’re anything like my old agnostic self you have to constantly tend to your gaps, refilling refilling refilling all the time like you’re trying to preserve the shape of a wet sandcastle.
Christ, though, inspires faith with the perfect shape and form to fill that gap. This faith still requires attention and maintenance, but unlike the hodgepodge of ’ secular’ faiths it replaces, it is fundamentally solid.