There are a few people who seem to think we (those who follow a faith, particularly Christianity) only believe because we are afraid of hell. Which prompted the question the OP asks.
Is the only reason you obey the law of the land because you are afraid of jail?
I actually act independent to the law. What motivates and guides me is my own moral reasoning and intuition. To be this way is the only truly free way in which to live and to be intellectually honest with myself.
Law and the relevant culture does run deep, and no doubt its presence throughout my life has rubbed off, perhaps framing certain things as default or presumed in my head, which might otherwise have appeared arbitrary to a person completely removed from such effects.
Never the less, for the most part i feel that my alignment with the law is simply coincidental, conditional on both my mind and the law agreeing on the underlying morality. When the law is wrong in my eyes, i tend not to let fear of repercussion or punishment beguile me into thinking it good.
Of course going to jail is a real threat, and is considered, but only from a pragmatic standpoint, not in a way that its presence as a threat impacts in anyway the initial moral qualities of the act in question.
Religion is in the business of meaning, or so it claims to be. But what its business really is, at least as far as i perceive it, is the control of people. There is something rotten and suspicious about a worldview that gains its weight by appealing to the words of God as quite literally the most meaningful words that could be, but then defers to threat of punishment and promise of reward as core mechanisms in the justification and policing of its prescribed way of life.
In a somewhat Nietzschean inspired manner, i tend to be quite anti authority and establishment. I like its justification to be clear, rather than have its validity and jurisdiction presumed and accepted by default or on tradition.
I think we are at almost every corner fashioned into this slavish, servile people, followers. Tame conventional creatures, committed to a life of comfort, staying out of trouble, keeping our noses clean, doing a good days work, behaving ourselves and wanting nothing more than to be a nice boy or a nice girl all the days of our lives. This society of essentially servile, mechanically living people who's lives are empty pointless sets of distractions one after another. Following the rules, just because. Religion, at least the Abrahamic ones, have a lot to answer for regarding this societal disposition. (And in following the law in so far as its 'rightness' is in its authority is yet another symptom of this slavish mindset.)
I often contemplate how tragic it is that so many people fail to rise above this all, myself included. And it further villainies the teachings of many religions that they actually endorse and actively fashion people into this way of life and state of mind, when all the while claiming to be a salvation, a truth that is there for the sole benefit of the person in question. It strikes me as one of the most powerfully trapping lies ever told.
All i have to do is look at a child, full of questions and wonder, free from the burdens of convention and servitude to see what so many people have sadly become as adults, and how far removed it must be from out true nature, and the free individuals we could otherwise be, truly authentic artists of our own existence. So much of the pain, anguish, depression and mental struggle of modern life likely stems from this way in which we deny ourselves who we are in order to yield to the paradigm of convention and rules. Sad times when you think of it like that.