Lee goes into Day 3 of the battle having severely bloodied the AOP on Days 1 and 2 (getting the better of the fighting on both days). He also knows that the chance for a Confederate victory is rapidly falling into complete nothingness. So he gambles it all on a Napoleonic style breakthrough.