The Confederacy had one strong army left, the Northern Virginia army. They wanted to fight the Union at Appomattox as a last ditch effort to defeat the north.
Although the Battle of Appomattox Court House didn't end the civil war, it was one of the last battles and had great impact on the defeat of the Confederacy.