So I was taught in my youth by Mormons that we are tested to see which of us can be trusted by God with godly powers. Cue DCP's outrage; he's never heard of such a thing--and if DCP hasn't heard of it, it ain't Mormon, folks. After all, DCP and some of his minions fashion DCP as the ultimate arbiter of all things Mormon and not. Just ask him.
Either the commandments (for which it is a "sin" not to do as commanded) test some characteristics that are prerequisites to being exalted as a god/goddess with all the attendant powers, or it is more of a pecking-order obedience that is being tested. For the latter, what is important is that you hop-to every time Elohim snaps his fingers and blindly do whatever E asks, both now and in the afterlife eternity. This leaves the heavens as a bureaucracy of egomaniacs to rival even the most self-indulgent military commanders. Is that heaven?
If it is the former, then for example, there is some incompatibility with having such power and perhaps bearing false witness against your neighbor. There is no logical nexus that liars cannot have power, but why give liars this immense power. So Elohim won't let you join the 5-Timers Club--I mean, won't exalt you as a god--unless you demonstrate that you won't bear false witness against others. Others in this vein require that you not have sex except within marriage and not covet (not be envious).
But E or Jehovah, whichever you like as the 'god of the Old Testament', falls quite short of this standard. Let's take a look at some of these. First, Thou shalt not kill. Oops. Two of my favorites of E/J doing this are Noah's flood, killing all but Noah and his brood (Genesis 6-9), and unleashing two she-bears to kill 40 youths who made fun of Elisha for being bald (2 Kings 2:23-25). But, for Mormons, there's the added bonus of slaying Laban (1 Nephi 3-4). The Book of Mormon is truly a second witness to the Bible.
Second (and third), stealing (and lying). Jacob deceived his father Isaac and stole Esau's birthright (Genesis 25). Despite these transgressions, E/J chose Jacob unto Himself (Psalm 135:4). For Mormons, there's the extra special theft of the plates that Laban had (1 Nephi 2-4), which according to the Book of Mormon, E/J instructed Nephi to take them. It was okay for Nephi to break into Laban's house and take them because they were Lehi's plates in the first place (too bad O.J. Simpson didn't have E/J for a judge in Las Vegas, had he, then O.J. would have been treated with respect by the court for having broken into others' hotel room to retrieve his football trophies, etc., instead of sent to prison for armed robbery, assault with a deadly weapon, etc.). And let's not forget, in Jacob fashion, Nephi dressed like another (Laban) to be deceive Laban's servant (1 Nephi 4:19-23).
But maybe GrandGod--E's God, our GrandGod--didn't care about these things. There are lots of Biblical examples of E/J losing his temper, acting jealously and with vengeance. Recall unleashing the she-bears. So apparently GrandGod was willing to entrust god-like power to E/J, who passed GrandGod's mortal test. Either GrandGod's test was faulty, or E/J gamed the test somehow and got the god-like power from GrandGod even though E/J was yet jealous, tempestuous, vengeful, and condoning deceit, lying and theft.