I remember as a child reading scripture stories with my father. We read from an old book of Bible stories (I think there were two: one for the Old Testament and one for the New) with wonderful illustrations for each story. The book had been my father's father's as a child, I think. (Or so I thought at the time; the book was too old to me to have just been my father's.)
I don't recall any specific story or picture now so many years later, but my memory is of fantastic, almost scary pictures, depicting an "angry" God of the Old Testament. Whether right or wrong, that sense of an angry God shaped my thinking about the God of the Old Testament for years to come. The movie The Ten Commandments added to that image for me as a child, painted the Old Testament God as powerful and willing to destroy the wicked to save His chosen people. In fact, now I don't believe that view.
When I was on my mission, I read the Old Testament for the first time. I was frankly surprised to read as much about the love of God as I did in Leviticus and Deuteronomy. Yes, there are other stories that seem to paint a picture of an angry God: Sodom and Gommorah in which Abraham bargains not to have a city destroyed; Job in which God allows Job to suffer; Joseph's being cast into prison even after making the right choice and running from Potiphar's wife; and stories of non-believers being, as a friend of mine in college used to say, "zapped." But those first two commandments, love of God and love of neighbor, are also clear.
In the New Testament and the Book of Mormon, a different picture of God emerged for me. First, influenced by Joseph's experience in the sacred grove, I understood the difference between God the Father and His Son, Jesus Christ – that they were two distinct beings. Further I came to understand that Jesus Christ is the Jehovah of the Old Testament. And taking the New Testament and the Book of Mormon together, I came to understand Him as a loving God, as is His Father.
In John, the Savior teaches, "If ye love me, keep my commandments" (14:15). That there are blessings for obedience to the Lord's commandments is clear, and that lesson is taught in each volume of scripture. While the unschooled children of Israel may have been taught to fear God, and obeyed against the risk of apparent punishment, the higher law teaches us that we obey out of the motivation of the first great commandment, that we love God with all our heart, might, mind and strength.
We live in an economic world which rewards hard work and ingenuity; discipline leads us to success in school and success in the world around us. We look to titans of industry as our role models for economic advancement. And it is not without precedent for religious people also to assume that our good works will yield blessings (and also its converse, that an absence of righteousness may yield misfortune).
Careful observation of the world, however, makes clear that righteousness alone is not the determining factor in garnering the riches of this world. The rain falls on the just and the unjust alike. Plenty of unrighteous people make plenty of money, and plenty of righteous people don't.
Some may say that we obey in order to receive a better reward in the next life. While our obedience may lead to more blessings, King Benjamin taught that as soon as we obey the Lord blesses us. Now the Savior did teach that we should lay up treasures in Heaven, not on earth, but again, those Heavenly treasures, though the result of our obedience to His law, should not be our motivation.
Having said that, we're all on a path. And we're all at different places on that path. One of us may be content to obey out love with no thought of other benefit. Another might need some evidence of the wisdom of obedience first, and, after living the law may then develop the more pure love of God (John 7:14 suggests this is possible).
I remember sitting in a discussion in an elders quorum years and years ago. I had just finished my freshman year of college, and I had all the wisdom of a kid who had been ordained for about five months. In the quorum, they were talking about how to encourage more home teaching, and there were many practical ideas, such as encouraging home teaching companions (especially adults and youth paired together) to share an ice cream cone after doing their visits. Thinking back, it was a great suggestion. Not only would it provide a pleasant cap to an evening of visits, but it might encourage an informal relationship between junior and senior companions that could benefit the junior companion in the long run. Well, at the time, filled with idealism and a fair amount of self righteousness, I suggested that we shouldn't need ice cream to reward us for a job well done, that we ought to be motivated by our love for the Lord.
I was right on one level, of course. Our motivation for obedience should be our love for the Lord. But our other motivation should be that second great commandment: to love our neighbor as ourselves. And in showing love to our neighbor, we might also eat an ice cream cone or two.
Why do you obey?