It isn't the hold McCain has over Bush, it's what hold he has over CONGRESS.
After both the Senate and House passed the bill with such overwhelming majority, they could have been able to override President Bush's veto, so President Bush' only option to save face was to go along, or suffer a stinging defeat.
Don't forget he basks in the worship of the press.