Today in Relief Society we had the lesson from the Joseph Smith manual on temple ordinances and blessings. The teacher shared that she wondered why Joseph Smith was killed before the Nauvoo Temple was completed, particularly since it was so vital to him that the saints sacrifice and work to accomplish that task. She came across the answer in a quote by Wilford Woodruff that I had never heard and yet is just perfect. So, I thought I'd share it just in case someone else had wondered the same thing.
"I used to have peculiar feelings about his [Joseph Smith's] death and the way in which his life was taken. I felt that if, with the consent and good feelings of the brethren that waited on him after he crossed the river to leave Nauvoo, Joseph could have had his desire, he would have pioneered the way to the Rocky Mountains But since then I have been fully reconciled to the fact that it was according to the program, that it was required of him, as the head of this dispensation, that he should seal his testimony with his blood, and go hence to the spirit world, holding the keys of this dispensation, to open up the mission that is now being performed by way of preaching the gospel to the 'spirits in prison.'"—Wilford Woodruff, Journal of Discourses 24:54, January 27, 1883.
Joseph Smith had accomplished everything he was sent to earth to do, and the spirits in prison were waiting for him to bring light and knowledge to them. They needed to be prepared to accept the ordinances that those on earth would do for them when the temple was completed. So, Heavenly Father allowed Joseph and Hyrum to be martyred. Isn't that a wonderful testimony of the love of God for ALL of his children?