Generals will order their soldiers to "fight to the death" only when there is a military or political advantage to be gained. This was not the case here.
At the Alamo, some 174 Texans defended a fort to the death and inflicted several hundred casualties (a multiple of their own number) on the Mexicans. This weakened Santa Anna to the point where he could not pursue the main Texas force under Sam Houston until he received reinforcements. Houston also received reinforcements and won the battle of San Jacinto. A similar story could be told for say, the "fight to the death" defense of Stalingrad, to buy time for the encircling forces.
In the case of the Confederates, they had just been ousted from their fortified positions around Richmond, which was the Confederate capital. Half starved soldiers were fleeing west on foot, many without shoes. There were only about 30,000 left from an original strength of over 60,000. (And the decline in Confederate strength was more than 50% because many of these men were replacements for fallen veterans, supported by limited ammunition and almost no artillery.)
Their objective was Lynchburg, which supposedly offered them food and transportation to the mountains where there was at least a hope of a guerrilla resistance. Neither was present there, and the Confederates were caught in open country, outnumbered four to one, (not the earlier two to tone, in fortified positions), with hordes of Union cavalry ready to cut down any stragglers or "escapees" from the main fight. Under the circumstances, a "fight to the death" would have been suicide, without the chance of winning or even inflicting meaningful casualties.
In 1864, with his line broken at Spotsylvania, Lee ordered his men to "fight to the death" to close the breach while his engineers built a new line. That prolonged the war almost a year. No such advantage offered itself around Lynchburg.