This is a "which came first" type conundrum. My personal view is that basic decency and humanity came before religious morals. I don't think those under the scrutiny of, say, the inquisition, or those who were being burned at the stake as witches, or those who have been killed for being atheists, would neccessarily agree with your anecdotal experience. No offence. by the way, I'm Catholic.
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwjT_p29gcnTAhVP-mMKHeciC_gQFgglMAA&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDiscrimination_against_atheists&usg=AFQjCNHQBhKgZ7di9kSwvNityComZ1lgPA