The reason that McCain did was well as he did is spelled out: P A L I N.
Then nominate her for the top spot on the ticket next time - and put your "wisdom" to the test.
Of course the RCP poll averages show the McCain highwater mark on Spt. 8 four days after the convention. From there he slid steadily - by Sept 24 when he "suspended his campaign" and convinced many of his economic ineptitude - he had already lost his convention bounce. Why? Because Palin exposed her own ineptitude in a series of disasterous interviews and speeches? I would argue that is the case.
I'd say that's part of it, but not all of it. It would have helped if McCain hadn't told the world he knew nothing about the economy right before it melted down. Or pandered to the religious right after previously gaining a lot of his crediibilty on the left and in the center by calling them out for what they were. Palin was just another symptom, bad judgment was the illness.