The point being Joseph didn't give himself up with the knowledge that he was to be shot. From your link:
Joseph Smith and his companions were not even aware of the proceeding until after it was over.
He also took the opportunity to flee when it was presented to him, once he knew what his likely fate was to be. Also from your link.
Change of Venue and Escape[edit]
On January 25, 1839, Sidney Rigdon was released from jail following an eloquent self-defence in the Clay County Courthouse. Because of threats, however, he stayed at the jail until February 5, 1839.
On April 6, 1839, Smith and the prisoners were transferred to the Daviess County Jail in Gallatin where a Grand Jury was investigating. The Grand Jury was to indict them on murder, treason, burglary, arson, larceny, theft, and stealing.[11] Smith and the followers were to appeal for a change of venue to Marion County, Missouri in the northeast corner of the state near the village of Commerce, Illinois. However, the venue was changed to Boone County, Missouri.[12]
On April 15, 1839, en route to Boone County, Joseph Smith, Hyrum Smith, Lyman Wight, Alexander McRae, and Caleb Baldwin were allowed to escape after the sheriff and three of their guards drank whiskey while the fourth guard helped them saddle their horses for the escape. They arrived in Quincy, Illinois on April 22 and from there were to regroup at Nauvoo.
Why did he flee knowing that
"General Samuel D. Lucas, leading a militia of 2500 men[2] informed the Mormons at Far West that "...they would massacre every man, woman and child..." if Joseph Smith and several others were not given up".
The sequence of events provided by your link is:
1. General Lucas promises to massacre every man, woman and child if Joseph didn't surrender or was surrendered.
2. Joseph surrenders.
3. Secret trial at which the death sentence is pronounced.
4. Joseph finds out about death sentence.
5. Joseph flee's despite the standing threat to every man, woman and child made by General Lucas.
How's it looking now Why Me?