Because southerners were more greatly affected by the war and had a need to rationalize its origins and results, southern-oriented historians dominated Civil War historiography for the first century after the war. They created the “Myth of the Lost Cause” and designated Lee as the god of this mini-religion. Their creation was so effective that many Americans have perceived Lee as the greatest general of the war (and perhaps in “American” history) while Grant often was denigrated and rebuked as a butcher, a drunk, and a victor by brute force alone.
In no way, shape, or form was Robert E. Lee a greater general than the man who won both in the West (arguably the most tactically important victories) and in the East (the most politically important victories). Grant, with some stumbles causing great loss, was with his most important deputy Sherman, the man who figured out how to win the war at a time when defensive weapons were supreme (How did Lee do on the attack? See Seven Days, Antietam and Gettysburg -- not very well, won the first with heavy casualties, lucked out in the second, and was obliterated when he met the very tactically solid Meade). Note that Grant had an unknowing early assist from the brilliant and too often forgotten Winfield Scott the greatest American general between Washington and Grant.
The South's cause was lost because it was morally indefensible in every way. It was a cause that fought for the rich to hold all power while keeping blacks so low in the social structure that non-wealthy whites would tolerate it because at least they weren't on the bottom and could dream of heading west where they could be the wealthy planter. When that option ended because of Lincoln and the free-soilers all hell broke loose.
There was, at heart, very little that is ever moral about a Civil War, though sometimes there are beneficial side effects. In this country those beneficial effects were the 13th through 15th Amendments.
And yet, we continue to hold ourselves and our history hostage to the great sin of the American experiment (along with the simultaneous and then post-civil war ethnic cleansing of Native Americans) and it's malignancy.