If pain and sorrow and total punishment immediately followed the doing of evil, no soul would repeat a misdeed. If joy and peace and rewards were instantaneously given the doer of good, there could be no evil—all would do good and not because of the rightness of doing good. There would be no test of strength, no development of character, no growth of powers, no free agency, no Satanic controls.
Should all prayers be immediately answered according to our selfish desires and our limited understanding, then there would be little or no suffering, sorrow, disappointment, or even death; and if these were not, there would also be an absence of joy, success, resurrection, eternal life, and godhood.
(Spencer W. Kimball, Improvement Era, Mar. 1966, pp. 180, 210)