While I share your disdain for the GOP leadership and the RINO infestation.....
.....the voters in the early primaries put McCain in place.
He did have some help when others left the primary race. I live in Ohio and didn't vote McCain in the primaries on principle despite the fact that McCain was the only real contender left. He won by default at that point. The fix for this I think would be a nationwide primary, preventing an early leader from running away by "stealing bases" that were unattended in the end.
IMO, it was the WV GOP with its first-ever WV Republican Presidential Convention on Super Tuesday that accomplished this.