According to LDS church, one has to sin in order to have joy: Book of Mormon 2nd Nephi 2:23 "... they would have had no children; wherefore they would have remained in a state of innocence, having no joy...., for they knew no sin."
When Adam was confronted by Yahuah, Adam said nothing about any snake tempting him; And promptly falsely accused Eve and the Creator. Thus Adam was symbolically a snake. Adam had full access to the Creator, and decided for himself to define good and evil; And what Adam wanted was good,, so Adam in effect cast the Creator out/murdered Him mentally. What Adam did was imprinted in his genetic code, and thus Cain did the same, doing what he wanted, which was to kill Abel.
Every son of Adam has this genetic trait, which is why Christ said only the overcomers enter the Kingdom of Heaven - New Yerusalem.
Overcomers put the Creator's Law 1st and their personal desires 2nd,
When Adam and Eve were placed within the Garden of Eden, they were in a state of innocence not knowing good or evil. How can anyone have joy in doing what is good if they do not even know what good or evil is? By partaking of the tree of knowledge of good and evil, Both Adam and Eve became aware of good and evil and thus became more like the Gods and were able to have joy in doing what was good.
Genesis 3:22
22 And the Lord God said, Behold, the man is become as one of us, to know good and evil: and now, lest he put forth his hand, and take also of the tree of life, and eat, and live for ever:
If God, who knows the end from the beginning, who also knew everything that Adam and Eve would do in advance and fully understood what the outcome would be, then why would he place Satan on the earth to tempt them and why would he place the tree of knowledge of good and evil in the garden knowing full well that Adam and Eve would succumb. We know that God the Father chose Jesus Christ before the foundation of the world to be a savior of mankind. This proves that God had the foreknowledge of what would take place in the garden. Yet he went ahead with it anyway. Why would God do that if he never wanted Adam and Eve to partake of the tree of knowledge of good and evil? Why not send Satan somewhere else besides this earth? Why place the tree of knowledge of good and evil in the garden knowing full well that Adam and Eve would partake of it?
1 Peter 1:19-20
19 But with the precious blood of Christ, as of a lamb without blemish and without spot:
20 Who verily was foreordained before the foundation of the world, but was manifest in these last times for you,
God understood that in order for man to progress, they would need to experience mortality and would need to have a knowledge of good and evil. However, God couldn't simply condemn mankind to a fallen state without them disobeying a commandment. For this reason Adam and Eve were commanded not to partake of the tree of knowledge of good and evil for in the day they ate from it, they would surely die. God knew in advance that Adam and Eve would fall and that they would need a Savior. He also knew that for them to advance, they would need a knowledge of good and evil and by so doing they would have joy in doing that which was good.
2 Nephi 2:22-26
22 And now, behold, if Adam had not transgressed he would not have fallen, but he would have remained in the garden of Eden. And all things which were created must have remained in the same state in which they were after they were created; and they must have remained forever, and had no end.
23 And they would have had no children; wherefore they would have remained in a state of innocence, having no joy, for they knew no misery; doing no good, for they knew no sin.
24 But behold, all things have been done in the wisdom of him who knoweth all things.
25 Adam fell that men might be; and men are, that they might have joy.
26 And the Messiah cometh in the fulness of time, that he may redeem the children of men from the fall. And because that they are redeemed from the fall they have become free forever, knowing good from evil; to act for themselves and not to be acted upon, save it be by the punishment of the law at the great and last day, according to the commandments which God hath given.