There's a running theory that any New Yorker cartoon's caption can be replaced with the sentence, "Christ, what an a**hole" without losing its comedic value. This is yet another example that doesn't disappoint.
I can't see Grant doing this either and that was the point of the cartoon- to lampoon Grant in a situation he would not likely have done. But I think the real humor here was supposed to be about Grant, who typically was unemotional and not subject to outbursts, is shown going "YESSS!!!! WOOHOOO!!!!" after four long years of war. I've always laughed at this cartoon not for making fun of Lee- and to be very honest with you, I never even noticed him in the background until yesterday- but for making fun of Grant.