Lee did not "join" the Confederate Army. Lee resigned his commission and moved home to Virginia. He was appointed as a colonel in the Virginia state militia before secession. After secession, he remained in Virginia militia for some time before he was given a commission in the CSA Army. He took command of the Army of Northern Virginia early in the Battle of the Seven Days when general Joseph Johnston was wounded. It was basically a series of promotions over which he had little control, save that he could have left military service entirely. From his own perspective, his native country, Virginia, was being invaded and he was fighting to defend it. It's important, I think, to recognize the perspective of historical figures -- they lack access to the information we have, and can only be judged morally the standards of their own times. Dracula (the historical figure, not Bram Stoker's creation) impaled his enemies on long spikes -- this is brutal savagery by our modern perspective, but was a moral way to discourage further invasions in his own view. Yes, Lee defended slavery. So what?