"Be Careful What You Wish For" is a common theme in storytelling. You can find it in the stories of evil djinn in Eastern fables, in the old European tales like the story of Rumplestiltskin, in episodes of "The Twilight Zone."
It teaches to the (mostly children) listeners that you should beware of quick, easy solutions to your troubles. If you work hard and honestly for what you want, you'll have earned it outright, but if you cut corners, you'll often pay in unseen prices.
In no story is this more obvious than the truly creepy tale of "The Monkey's Paw." With this magical wish-granting item, a family tries to use it to quickly reverse their fortunes. But following its own twisted logic, the Paw kills their son, and when they wish for him back, he arises from the grave an undead thing scratching at their door. The family is left alone, empty, and worse off than they started, because to get what they thought they wanted, they gave up the things they loved.
So it will be for John McCain.