I disagree. I'm going to ignore the pseudo-philosophy of whether Cena deserved it because it places me on shaky ground on the same side as people who do not understand the business.
Cena needed the win more than The Rock. Cena is hated because fans resent "Super-Cena" who fights the bad guy and wins. It is like he is a superhero, when placed against another hero, he loses - he is average. It makes the whole thing seem more super-heroic, that he lost. I think a win for Cena would have legitimized him greatly. When the fans are not on his side, he loses (Punk, Van Dam, Rock) and so fans try to imitate that by booing him everywhere. It is a tough point to elaborate but I think there is something there...
Rock needed to show that he can still 'go' and he did that. He did not need the win. A loss would have shown a hunger for the WWE which would have been far more appealing to me. It would mean he still needed to prove himself with the title rather than to obviously establish himself as awesome by taking the belt from whichever sap happens to have it when he returns.
I think the fans that have decided to hate on Cena will continue to do so regardless of whoever he beats and however he beats them tbh. Whilst it's true to say that Cena lost on the occasions you've pointed out when the fans have not been behind him, there are loads of instances where the crowd has been against him and he's emerged victorious (HHH, HBK, Angle, Jericho to name a few of these types of occasions). Whether like him or not, he's mega over, the fact that hardly anyone ever gets such a strong (albeit mixed) crowd reaction is testament to this, so I don't think his legitimacy can be questioned. I think Cena still gets booed, not only because it's what members of the IWC have to do to be fashionable and fit in, but because their antics have bred a culture in which the booing of Cena is fun/funny/part of the show. In any event, one gets the feeling that half the people doing the actual booing don't actually give a **** (conjecture on my part perhaps, but I doubt a great many of those who object to Cena have a valid or even slightly persuasive reason for doing so).
As an aside, this is a tough break for Cena, because I don't think many (maybe any) have the drive and intensity for the business and passion for the fans that he does, so I imagine the boos must hurt, but as long as he keeps getting reactions as strong as the ones he does at the moment then he'll keep coming back for me, and credit to him. It's just sad that I fear he may be plagued by this split reception for the rest of his career, and that'd be the shame.The guy's delivered solid to fantastic work in every program he's been put in since more or less the time he debuted, and since then he's carried the company through the most barren period it's seen since well before the attitude era (late 2005 - late 2007), and headlined some of the biggest events in industry history. For these reasons I don't think his legitimacy can be questioned, even by those who dislike him.
As GIMH has said RE: The Rock, if he has serious aspirations of recapturing the WWE title at some point in the next 12 months, it simply would not do to have him come back in without having picked up a singles win since 2003. I know he needed to show he could still bring it, but to do this and then not win against Cena would be very much a case of "almost not buying you the groceries", as JR would term it. What happens from hereon will probably determine whether or not him winning was the correct decision, but as things stand at the moment, I'm leaning towards saying yes.