With McCain's likely terminal diagnosis, his political career is coming to an end, and he is no longer indebted to the big money that politicians rely on to get elected. This freedom has enabled him to acknowledge that the pros of the Affordable Care Act outweigh the cons, and vote accordingly.

I imagine it gives him a little extra satisfaction to know that the clown in the White House that has insulted him publicly was so reliant on his vote on this matter, and he was able to essentially tell him to GFY.