There is a very good rational for this. You only need accept the plausible premise that Hillary cares more about her own future prospects at getting to the White House than she cares for a Dem getting there this time.
Odds are, she will lose the nomination. If that happens, you get either Obama or McCain becoming President. If Obama becomes Pres and has a half-good term, the Dems would rather have him run for re-election than field a new Dem candidate. So then, Hillary will be shut out for 8 years, which is longer than she can wait. If Obama loses the general election and McCain makes President, then Hillary will have a very good shot in 4 years time. Besides, she will also have the argument then that the Dems didn't pick her last time round...and see what happened?
So, it's vital for Hillary that McCain beats Obama in the general. And once the primary is over, she will no longer have a defensible reason for slinging mud at Obama (or her game will be up). She's got very little time left and a whole lot of slinging in stock. So given the premise, she's not slinging to win the primary, she's slinging so Obama loses the general.