Back when I was lowly peon/production assistant on a film set, I remember getting the advice to be careful not to offend anyone. They told me that the intern you might have cursed at for bringing you a bottle of warm water could be your producer/boss tomorrow, and they certainly wouldn't forgive your nasty behavior when they were in charge. I thought this advice was ridiculous. Be nice to everyone is my motto, not because the janitor could be the next CEO but because he is a human being. All human beings (and animals, too) deserve respect and kindness (exception to the rule: the jerk that cut me off in traffic. But I don't think he could hear me cursing at him...)
Attempting to offend no one when you write is a completely different proposition. First of all, it's really difficult to know what someone might find offensive. Hair dye? Someone who curses? Someone who carries a gun? And the attempt to make something unoffensive often makes the work offensively bland. In order to interest people in your story, you have to have a unique voice and point of view. That voice may be too strident for some, but for others it will be intriguing and interesting. So it's a delicate balance.
My sleuth Lydia McKenzie makes no mention of going to church, and says she gets religious only when she loses her keys. So far I have not received any mail about this comment--so perhaps people just accepted it at face value. And probably the reason it's not offensive is that she's not telling anyone else what to think or slamming religion in any way, just stating how she feels. You have to be pretty isolated to have never met anyone that believes something different, so I think most of us get used to hearing other points of view.
I am a strong believer in moderation. I grew up in a political left-leaning household, and I know full well that radical people on the left and right can each be so radical they somehow morph into one another. I don't believe in shoving my politics down anyone's throat, but perhaps I'm just fooling myself. It can seem sometimes that just existing is a political act (a woman who takes a job and does not become a full time wife and mother is for some people offensive--or vice versa).