Robert E. Lee, commander of the Confederate troops, led his forces into Gettysburg, a Northern state.
This decision was controversial, as many Southerners believed they should not invade the North.
Lee's rationale was that bringing the war to the Northern population was necessary to force their surrender.
Outcome: Despite not technically surrendering, Lee was compelled to retreat from Gettysburg under the cover of night due to heavy losses. He recognized that continuing the battle would result in unsustainable casualties for his army.
The North's advantage in population meant they could replenish their troops more readily than the South. The North had 22,000,000 people, while the South only had 5,500,000. War casualties significantly impacted the ability to maintain troop levels.
Population_{North} = 22,000,000
Population_{South} = 5,500,000
The North also had the ability to draft more men.