Contrary to what many will have you believe, Robert E. Lee was not fighting for slavery. In fact, he was against slavery, he even referred to it as a "moral and political evil."
He fought for his homeland. When his home state, Virginia, seceded from the Union, he decided to lead it's army, not towards slavery, but towards states rights, and a man fighting for his home is always a hero.
It really depends on the POV of the speaker. Fidel Castro is considered a hero to many and a scourge to others. The original ayatollah (Khomeini) was a hero to many Iranians who was seen to remove the American presence (the US removed their democratically elected govt a decade or so earlier), but is considered the devil incarnate in America (at the very least, guilty of embassy breach of protocol). Things are never black and white (no pun intended). Its a grey world.