Answer:
Sheer exhaustion.
The Confederate armies had run out of manpower, and the troops in the field were barefoot and starving, with nowhere to go.
Logically, they should have surrendered when Lincoln got re-elected in November 1864. (That was the North voting to fight on.)
But they were not the sort of people to submit to logic - only to relentless military action, right to the end.