Cynical as always, the political machine (and yes, this is a bipartisan trait) has picked the candidate with the best potential to bring in the votes, never mind how.
McCain's campaign calculates that there are millions of seething women out there who are frustrated at their favourite candidate Hillary Clinton's defeat in the Democratic primaries. Not to put too fine a point on it, they're counting on sexism to bring those disaffected voters to the Republican side. They're gambling that millions of women will put aside issues of party affiliation, policies and plans, and vote purely on the issue of gender.
I hope they're proved wrong. It would be terrible if sexism turns out to be a winning strategy.