(CNN) -- What the heck has happened to John McCain?
First he flip-flopped on immigration reform.
In 2006, Sen. John McCain was a primary co-sponsor of and worked closely with Sen. Ted Kennedy to craft immigration reform legislation that included a path to citizenship for America's undocumented immigrants.
But faced with a primary challenge from a tea party Republican in 2010, McCain denied that he had ever supported a path to citizenship. McCain subsequently threw his support behind Arizona state legislation that ostensibly allows for racial profiling of Latinos and is considered one of the harshest anti-immigration laws in the nation.
Then he flip-flopped on legislation meant to address the dangers of climate change.
In 2003, McCain was a key supporter of so-called "cap and trade" legislation that would create a market-based solution to limit pollution. During his 2008 presidential run, McCain boasted of his support for cap-and-trade measures. "We stand warned by serious and credible scientists across the world that time is short and the dangers are great," said McCain. "The most relevant question now is whether our own government is equal to the challenge." McCain, it appears, was not.
By 2009, McCain was calling such measures "cap and tax." By 2014, McCain was blasting Secretary of State John Kerry for even talking about climate change.
And now we have Bowe Bergdahl.
Recently, the Fact Checker column of the Washington Post found that Senator McCain had flip-flopped on his support for a prisoner swap in exchange for the release of Sergeant Bergdahl. The Post awarding McCain a rare upside-down Pinocchio for his switch in positions.
In February 2014, McCain told CNN's Anderson Cooper, "Now this idea is for an exchange of prisoners for our American fighting man. I would be inclined to support such a thing depending on a lot of the details." That was before Obama actually made the exchange. Then McCain said he was against it.
McCain claims his objection was based on the details of the five Taliban prisoners swapped for Bergdahl but as the Washington Post Fact Checker pointed out, the details around those five specific prisoners were widely known in February when McCain originally commented. In fact, the Washington Post ran a front-page story with details about the prisoners.
McCain's flip-flop, like all his others, was nothing more than political opportunism, plain and simple.
Moreover, these are not the only times McCain has wildly switched positions on fundamental issues. Suzy Khimm, then of Mother Jones magazine, produced a thorough list including other flip-flops as of August 2010. But it's somehow especially stunning to hear John McCain flip-flop on the issue of Bergdahl in particular.
After all, McCain is without question a true American hero. And he has been, from his earliest days, a man of principle.
In 1968, a year into his imprisonment and torture as a prisoner of war during the Vietnam War, McCain was offered early release — the North Vietnamese seeking to gain publicity points after McCain's admiral father was put in command of all U.S. forces in the region. The young John McCain refused. He would only agree to be released if every American taken prisoner before him was released as well. It was only then that McCain was subject to heinous and severe torture, including beatings every two hours.
Five-and-a-half years later, the principled POW and his fellow soldiers were released and came home. They received a heroes' welcome. The New York Times put a picture of McCain's homecoming on its front page.
It's important to remember that McCain was ultimately released by the North Vietnamese as part of winding down of the war. That's what happens when you end a war; you exchange prisoners — even the dangerous ones.
In the case of the five Taliban prisoners swapped for Bergdahl, even a legal adviser from the George W. Bush administration has argued there would be no grounds to continue holding them after the war in Afghanistan officially ended later this year. And by then, they wouldn't even be useful as leverage for Bergdahl's return.
Certainly John McCain knows the immense suffering and brutality of being a prisoner of war. He also knows what happens when wars end.
In fact, I like to imagine that John McCain knows a lot of things including how ridiculous his repeated backtracking seems in light of his own self-proclaimed principled "maverick" identity.
But these radical shifts in position say less about McCain as a person and more about the political party to which he belongs, a party that was for immigration reform and for cap-and-trade regulations and for doing whatever it took to bring Bowe Berdahl home up until the moment that President Obama took the same side.
The modern Republican Party is desperately opportunistic and reactionary, trading whatever thin principles it may have once held to simply stand against whatever the other side is for.
And John McCain, whether willingly or unwittingly, is at best an illustrative canary in the coal mine or at worst, yet again held hostage -- this time by an increasingly reckless and irrational GOP.
UPDATE: An earlier version incorrectly listed McCain as being awarded the Medal of Honor.