It was the divine plan from the very beginning that man should be placed on the earth and be subject to mortal conditions and pass through a probationary state as explained in the Book of Mormon where he and his posterity would be subject to all mortal conditions. It was part of the divine plan that man should have this period of mortality where he would be shut out of the presence of God and be subject to all the vicissitudes of mortality, the temptations and trials of the flesh, thus gaining experience and being placed in a position of trial, temptation, and be purified by passing through the trials and tribulations of the flesh, or mortality, as Paul has described it. This life is a very brief part of our existence, but is the most critical, for it is in mortality where we are tried and figuratively placed in the fire and tested, proved to see what kind of material we are made of, whether we will be worthy of an exaltation in the kingdom of God or be assigned to some other kingdom(Joseph Fielding Smith, Answers to Gospel Questions, 4:81-82)