Although some, if not many, religious people believe that their moral code is stemmed from their religious beliefs I believe that is just how they are perceiving the inherent morality that 9/10 of us intrinsically live life by.
For example, a Christian might say that they will not steal from 7-Eleven because God will judge them and punish them but ultimately it's probably due to the fact that stealing from others causes those being stolen from harm which most of us will feel bad about doing. We know what it would feel like to be stolen from so we don't really want to do it to others. Hurting others hurts the community which ultimately hurts you.
In other words, they are just giving credit to their god and doctrine for something that is probably just human nature for most of us. This merely confirms their bias to themselves in a way.
For example, a Christian might say that they will not steal from 7-Eleven because God will judge them and punish them but ultimately it's probably due to the fact that stealing from others causes those being stolen from harm which most of us will feel bad about doing. We know what it would feel like to be stolen from so we don't really want to do it to others. Hurting others hurts the community which ultimately hurts you.
In other words, they are just giving credit to their god and doctrine for something that is probably just human nature for most of us. This merely confirms their bias to themselves in a way.