"Religious" people are as diverse as the day is long, for starters. So let's consider that. However, the common element is that they
usually believe there is a Creator God who wishes us to live and conduct ourselves in a certain way, or at least to avoid certain egregious things. Sometimes, again depending on doctrine, certain failures to do so result in either lack of reward or often punishment. So that's bad. It's not hard to understand.
Without going on too much about what is and what isn't, what's realistic and what's not, etc, I offer the following simple and understandable anecdotes. A long time ago, before science, medicine, technology, and any of that, when the first civilizations and societies first started taking root, observations and patterns that could not be explained where noticed. For example, if you were uncleanly or kept garbage and rotting organic matter around or otherwise did a poor job at sanitation, you most likely were more at risk of becoming sick or contracting an infection. How else could someone explain this at such a time? Perhaps, God wants us to be clean, tidy, and orderly, and avoid
the deadly sin of Sloth, otherwise we would be punished, often severely, perhaps even fatally. It made sense, and dang it it worked and saved lives.
Now, these days with all the science and knowledge readily available, such knowledge that (I recall hearing this quote once and though it is memorable enough for me to deem it worthy and relevant of posting here and now, cannot seem to recall from where it was from..) "the average schoolboy is now familiar with facts that Archimedes would have gave his life for"... there seems to be less room for faith. Now, imagine, today in some third world country. A man is being attacked by a larger assailant and is about to be fatally killed in front of many shocked onlookers frozen and pacified by fear. He screams out to the Heavens, and the assailant is struck dead by an inexplicable bolt of lightning from the sky. What are the odds? Slim to none. Therefore, a miracle. Proof of God. Even the most educated, snobbish, and otherwise rational man couldn't help but ponder for at least a moment over the phenomenal chances such an event would occur. This is how legends are born. Granted, most self-determined affirmations of faith are far less remarkable than this. Often a simple predicament solved unexpectedly or slightly annoying situation turned in ones favor. However, faith is faith.
So, it depends on what one believes is the will of said higher power. I suppose more importantly, what is the punishment dealt when certain commandments are broken. It's an act and viewpoint of compassion more so than not. Save for those who just like to milk and cattle-prod the gullible. Of which there are many.