It's a little bit of everything, really.
Agreed. McCain seemed (dare I use a talking point phrase?) erratic in the face of a crisis, and kept switching positions on a dime. Do any of us still know a coherent position on the economy other than "CUT TAXES CUT TAXES CUT TAXES!"? One moment we're in crisis mode, the next the fundamentals are strong, the next a bailout is a bad idea, then it's a good idea, then he says on morning joe it's a tragedy but he'll vote for it anyway. He attacks millions of dollars for bear DNA studying on a debate then it turns out he voted for that too. The list can go on and on. McCain himself was the biggest reason he lost, but it wasn't the only one.
McCain was also an arrogant ass to Obama in two of the debates and seemed sarcastic and grumpy on the trail.
Palin was a disaster. In her own right and for McCain. She was a showhorse who knew next to nothing about even basic things, and it undercut McCain's own message of 'experience.' It also hurt his position among women ironically because it was clear she was picked solely based on her gender and her batsh**t beliefs.
Bush, of course, was also a big part of it, because it destroyed any and all Republican credibility. After 8 years of complete disaster McCain comes along sharing 8/10 positions with Bush himself. It was pretty clear that most voters were going to the booths and remembering the face of Bush.
But ultimately, it was McCain himself and McCain's campaign, who couldn't stay on message for more than five seconds, stoked up racism and religious intolerance, inspired hatred and fear over Obama in the hearts and minds of millions, and had to constantly stop and correct itself. The Republican party is becoming a regional party and that's incredibly dangerous, and that campaign seemed incapable of playing to anyone beyond Joe & Mary Jesus-lover from Texas.