After all, DC was right on the border with Virginia, and battles ranged as far north as Pennsylvania.
The wording of the query applies to the Union. Have you considered the idential question from the other side: why did the Confederates put their capital in Richmond after Lincoln called up militias, and why did they maintain it there?