CNN | 5/22/2019 | Listen

Mark Sanford couldn't get away with cheating on Trump

Updated 12:51 PM ET, Wed June 13, 2018

Editor's Note: Scott Jennings, a CNN contributor, is a former special assistant to President George W. Bush and former campaign adviser to Sen. Mitch McConnell. He is a partner at RunSwitch Public Relations in Louisville, Kentucky. Follow him on Twitter @ScottJenningsKY. The opinions expressed in this commentary are his own.

(CNN) - Mark Sanford survived cheating on his wife, but he could not survive cheating on Donald Trump.

The South Carolina Congressman lost his primary on June 12 after a long career in politics in which he had never previously lost a race. And this despite the bizarre episode in 2009 in which his office, attempting to cover up an affair, said he was "hiking the Appalachian Trail" when Sanford, then governor of South Carolina, was really in Argentina with his mistress.

Sanford never resigned the governorship, won election to Congress in 2013 and didn't even face a general election challenger in 2014. In 2016, Sanford won a primary before winning easily in the fall.

Then Trump came into his life, and all hell broke loose. Sanford became one of the President's most vocal critics, hammering Trump from the beginning of the chief executive's term. While Sanford's anti-Trump rhetoric gets most of the blame for his primary loss, the real meat of it can be found in Sanford's voting record.

According to an analysis of congressional voting records done by the site 538, only four members of the House Republican conference voted less frequently with Trump than Sanford did. Based on the election results in 2016, the analysis predicted Sanford to vote with Trump 87% the time, when in fact he only voted with Trump 73% of time (very low compared to the rest of his colleagues, who voted with Trump over 90% of the time).

However, this wasn't a general election. This was a GOP primary, and Republicans are solidly unified behind Trump and his agenda. At the 500-day mark of his presidency, Axios judges Trump to have the highest "own party" support of any president not named George W. Bush after 9-11.

There's room in the party for people to have stylistic differences with the President. It's hard to imagine, for instance, people more personally dissimilar than Trump and Senate Majority Leader Mitch McConnell. But Republican voters expect them to be unified on policy, and they certainly are (McConnell votes with Trump 96% of the time).

But this wasn't an issue of style. By straying from the President's agenda, Sanford signaled to the Republicans in his district that he was not interested in representing their views or in helping the GOP achieve results through unity. When you have a president of your party, he or she sets the policy agenda. When you get out of step with that, you are on the chopping block.

Let's look at another primary from Tuesday night in Virginia, where incumbent Congressman Scott Taylor in the 10th District faced a pro-Trump challenger who argued that Taylor was not sufficiently loyal to the President.

In this case, Taylor had voted with Trump nearly 99% of the time. He won 76% of the vote in the primary, an easy win. Taylor had expressed discomfort with Trump stylistically (he once said Trump needed to be more "careful with his words") but on policy he unfailingly voted Trump's position.

Taylor was a team player when it mattered. Sanford was not.

Republicans want unity in the party because they believe in the Trump agenda, and they realize that politics is a team sport. They aren't interested in people giving lip service to conservative Republican values at home while voting to spoil Trump's broth in Washington.

Primary voter tolerance for infighting among Republicans has waned under Trump because people realize that teamwork produces results. They like conservative judges, a strong national defense, lower taxes and the cracking economy -- all things made possible by Republicans sticking together to produce policy wins. In CNN's May survey, 64% of Republicans said they had more confidence in Trump to handle the issues of the day versus just 26% who said Republicans in Congress.

Sanford's loss should be a wake-up call for Republican members of Congress who find themselves out of step with the Trump policy agenda. Voters will forgive lots of things -- even affairs and prickliness, as Sanford learned -- but they will not tolerate an interruption of the progress being made under unified Republican control in Washington. Republicans have no interest in going back to the policy incrementalism of the past.

The Mark Sanford's of the world learned last night that when you vote against the Trump agenda, Republican voters in your district might just tell you to take (another) hike.

© 2019 Cable News Network. Turner Broadcasting System, Inc. All Rights Reserved.

Listen to CNN (low-bandwidth usage)

Go to the full CNN experience