Agency may have been one of the first issues to arise in the premortal council in heaven. It was one of the main causes of the conflict between the followers of Christ and the followers of Satan. Satan said he would bring all of us back to our Father's presence, but he would have taken away our agency. Without the gift of agency, we would have been unable to show our Heavenly Father whether we would do all that he commanded us. When we choose to live according to God's plan for us, our agency is strengthened.
Right choices increase our power to make more right choices.
As we obey each of our Father's commandments, we grow in wisdom and strength of character. Our faith increases. We find it easier to make right choices. We began to make choices as spirit children in our Heavenly Father's presence. Our choices there made us worthy to come to earth.