" His senior subordinate, Longstreet, counseled a strategic movethe Army should leave its current position, swing around the Union left flank, and interpose itself on Meade's lines of communication, inviting an attack by Meade that could be received on advantageous ground. Longstreet argued that this was the entire point of the Gettysburg campaign, to move strategically into enemy territory but fight only defensive battles there. Lee rejected this argument because he was concerned about the morale of his soldiers having to give up the ground for which they fought so hard the day before. He wanted to retain the initiative and had a high degree of confidence in the ability of his army to succeed in any endeavor, an opinion bolstered by their spectacular victories the previous day and at Chancellorsville."
Link
Reading through the Wikipedia links and a short link on Cashtown, the understanding I have is that, as you wrote Kenny Bunk, Lee intended to fight a defensive battle on favorable ground at Cashtown but allowed a subordinate, A.P. Hill to become decisively engaged at Gettysburg and allowing that decision to stand (i.e. not ordering A.P Hill to immediately disengage and follow the plan to concentrate for battle at Cashtown) consequently permitted the battle strategy to shift from one to be fought on favorable defensive terms to one that was fought on unfavorable offensive terms.
Longstreet's recommendation to convert the situation to a defensive battle at the end of Day One (1 July 1863), as you note in the citation from the link Flag_This, has two problems: 1) considerable Confederate blood already has been shed in achieving the ground gained on Day One and 2) exactly where was this defensive position across Meade's lines of communication that Longstreet wanted to move the Army of Northern Virginia to? Even had Lee wanted to follow Longstreet's advice, he had no way of quickly obtaining detailed knowledge of the terrain and the enemy situation to the south of Gettyburg thanks to the absence of J.E.B. Stuart. The only place he had prepared for defensive battle at was back up at Cashtown. Passing over the practical problems of actually shifting the entire Army of Northern Virginia across the front of Mede's entrenching and swelling forces, taking up a defensive position to the south of Gettysburg would have put Lee in the difficult position of being attacked by Union forces from up to three directions at once: from the North, the South, and the East.