Was it because we needed a testing ground away from the purity of our heavenly home so that we would have the opportunity to experience the consequences of making wrong choices?
In a nutshell, your own answer is right. The process by which physical bodies are made requires mortality. Only in mortality can we exercise our agency to the fullest degree and thus learn of the full power of choice and action that has been given to us by Heavenly Father. In order to understand the importance of right and wrong, we need to experience both personally. This experience makes us unfit for the presence of Heavenly Father, so he gave us a place to live while we learn these things. The Atonement is the key to this whole experience because right choices bring us closer to God and wrong choices take us farther from him. Through the Atonement we can repent of our wrong choices and come back to the presence of Heavenly Father.