Andrew Sullivan, who like much of the media establishment had written off Hillary Clinton, has a theory for why the polls were so wrong --
They [voters] may have told the pollsters one thing about voting for a black man, but in the privacy of the voting booth, something else happens.
It's amazing how quickly people who were proclaiming the end of identity politics with Obama reach for such unreconstructed explanations when it all goes wrong. If poll responders were picking up any media narrative in the last week, it was not that they had to vote for the black guy, but that it was silly to vote for the harpie Hillary who only got where she was because of Bill and everyone was sick of 1990s anyway.
But when they got their ballot paper, the person with the experience and the ruthlessness to win looked a lot better.
UPDATE: The issue of unreliable polling gets a more balanced consideration from the Washington Post, but one underlying issue -- the media establishment's hatred of Hillary Clinton, shown by Maureen Dowd's column today, is not mentioned.