Welcome from Pittsburgh!
IMHO, Lee knew that he couldn't win a defensive war against the Union, for the Confederacy to gain true independence, he had to take the offensive and win a few battles in the North. I really question why after Malvern Hill, he essentially did the same thing with Pickett's Charge...but given all else that transpired up to that point at Gettysburg, he had very few other options...If the timing of actions on Culp's Hill and JEB's cavalry would have been better coordinated maybe he may have had more success, but there are so many other variables, I believe that after the first day of the battle, the ANV really didn't have much chance of success at Gettysburg. (again IMHO LOL)