The comment was made, that God give us commandments "because he requires obedience." That person also stated:
"Not everyone that says unto Jesus that he is their Lord will be saved. Jesus clearly says that you must keep the commandments. Matthew 7:21."
To which I responded:
That Jesus requires that we follow the commandments does not by itself reveal the reason behind giving them. One of my favorite LDS doctrines, that men are that they might have joy, reveals in my opinion, the reason God created us and gives us instructions- it is for our own happiness. Many conservative LDS use this doctrine as justification or support for LDS commandments/standards themselves (taking the position, for example, that no matter how difficult or ridiculous it may seem to follow a purported commandment, we should follow it anyway because we can be sure that following it will make us happier). I take a different approach- that we can use the doctrine as a tool for helping us to determine whether a purported commandment is genuine. If, given the evidence and logic/reason available, it appears that a purported commandment would have a greater tendency to make people miserable rather than happy, we can take it as a strong indication, or at least a clue, that the purported commandment probably is not genuine.
If I ever subscribed to the idea that God gives us commandments for their own sake, it was long before my adult memory. The very idea is repulsive to me, and if it is the case, then it seems we have a very capricious and egotistical god.