I think Obama won because:
1. The press got behind him early on, and he began to enjoy a bit of "rock star" status as a result. The same thing blessed the campaign of Bill Clinton in 1992.
2. He won the Democratic Nomination because The Democratic Party Machine had gotten behind Hillary Clinton as their choice for 2008. The DNC failed to realize then -- AND AGAIN IN 2016 -- just how much of the country simply
3. And in response to the charismatic, youthful Rock Star, the GOP (just as dumb as the DNC) ran a lethargic, stodgy, boring, acidic, testy, sour-faced John McCain mostly on the basis of his having been a war-hero. And to compound that mistake, they allowed him to blow his first major decision, which was to choose that idiot from Alaska as his running mate.
At that point it didn't matter what color Mr. Obama was.