The laws of God can reward a righteous desire or attitude because an omniscient God can determine it, Elder Dallin H. Oaks has written. “If a person does not perform a particular commandment because he is genuinely unable to do so, but truly would if he could, our Heavenly Father will know this and will reward that person accordingly.”
“He That Knoweth Good and Evil, to Him It is Given According to His Desires”
Given the necessary time, both the righteous and the unrighteous desires of our hearts will find a way to express themselves. This is a simple manifestation of the verity that desires govern our choices and choices take us where we really want to go. It is also inherent in the plan of salvation that judgment involve a perfect blend of works and desires (see Alma 41:3; D&C 18:38; D&C 137:9). Thus, if we really wanted to do something—be it good or evil—but were unable to do it because of circumstances beyond our control, short of our repenting, a just God will reward or punish us as if we had actually done it.“To Him It Is Given According to His Desires”
Agency is the gift of heaven. It is only in and through the proper exercise of this gift that men and women can obtain exaltation, that they can willingly serve God and become like him. As with all of heaven’s gifts, its power to exalt is matched by an equal power to condemn when abused or misused.
Agency is fruit plucked from the tree of life. In it are seeds which, if properly planted, nurtured, and pruned, will bear the fruits of salvation; but if allowed to grow wild, they will produce the gall of bitterness and eventual destruction. Agency is our glory or our condemnation (see D&C 93:31-32).