Its probably because Lee fought very valiantly, ultimately failed, and then retired gracefully (becoming I believe, a surprisingly effective educator).
Grant OTOH, fought very valiantly, won by a cynical if effective process of attrition, and then went into politics, which is a surefire way to get folk riled up at you at the best of times. He was a great general, but not a particularly successful president, and as he did the latter after the former, he tended to get remembered for his failures as POTUS rather than his successes as General of all the armies.
Yet despite being a mediocre if not failure as President, there is still ample evidence that he was remembered fondly not only before but also after his death. He wouldn’t be on the $50 if he was really as bad as, say, Jimmy Carter.