www.lds.org; “Agency is the ability and privilege God gives us to choose and to act for ourselves. Agency is essential in the plan of salvation. Without it, we would not be able to learn or progress or follow the Savior. With it, we are “free to choose liberty and eternal life, through the great Mediator of all men, or to choose captivity and death, according to the captivity and power of the devil” (2 Nephi 2:27).”
1 Chronicles 28:9; “And thou, Solomon my son, know thou the God of thy father, and serve him with a perfect heart and with a willing mind: for the LORD searcheth all hearts, and understandeth all the imaginations of the thoughts: if thou seek him, he will be found of thee; but if thou forsake him, he will cast thee off for ever.”
It seems I am always using the example from Genesis where Adam and Eve “had” to eat the forbidden fruit. I am certain God did not want for Adam and Eve to sin. God in His mercy gave us another way.