Sarah Palin's convention speech was the highlight of that political season. She was electric. She was an instant star.
Funny, charming, cutting. Iron fist in a velvet glove.
Personal stuff aside, McCain was idiotic on a political level by not maximizing her benefit.
I don't think he intended to actually win... it was time for a black president. Palin brought new energy to his campaign, and I think that scared him. He didn't want to accidentally win, so he took steps to make sure she didn't help his ticket too much.