It’s not often that something almost universally unexpected happens in American politics. Frequent public opinion polls and a variety of political media usually give political junkies a good idea of what to expect next.

But not Tuesday, when House Majority Leader Eric Cantor was defeated in the Republican primary in the 7th congressional district of Virginia by Randolph-Macon College professor Dave Brat.

Cantor raised more than $5 million in campaign funds, Brat just over $200,000. But much of Cantor’s money was slated for House Republican colleagues, and Brat got vocal support — worth many times the amount he raised in a Republican primary — from talk show hosts Laura Ingraham and Mark Levin and columnist Ann Coulter.

It's tempting to classify this as a victory for the Tea Party movement over the Republican establishment. Cantor entered the race as the No. 2 member of the House Republican leadership, and Brat pursued some Tea Party themes (though without support from major Tea Party organizations), decrying the vast expansion of government not only under President Obama but also in the George W. Bush years.

But those are not the main lessons of this astonishing upset. One of those lessons is very old, an eternal maxim of politics. Another is familiar, a variation on a theme heard before. The third is relatively new, and perhaps points to a winning campaign theme for Republicans — or their opponents.

The old lesson is: Show up. Voters like to see their elected representatives, even when they have ascended the ranks of committee and leadership positions in Washington.

But Cantor didn't do that much, and it was a problem for him June 10, when he got 44 percent of the vote in Virginia 7. Similarly for longtime Senate Appropriations Committee member Thad Cochran on June 3 in Mississippi, when he ran narrowly behind state Sen. Chris McDaniel (there's a runoff June 24).

Cantor had been flying around the country raising money and campaigning for Republicans. Cochran, in his 36th year in the Senate and with no serious challenge in 30 years, had been spending a lot more time in committee rooms than on the stump.

Cantor should have known he was in trouble when he was booed at the Republican convention in Henrico County, one of three suburban Richmond counties that cast 71 percent of the primary votes in 7th district. David Brat carried all three, with 53 percent in Henrico, 55 percent in Chesterfield and 68 percent in Hanover.

The second lesson of Cantor's defeat is that immigration can still be a cutting issue, depending on the circumstances. Brat zeroed in on Cantor's recent support of measures for legalization of those brought over illegally when they were children.

This has been the most popular of the versions of legalization or amnesty, since the beneficiaries seemed sympathetic and not guilty of knowingly violating the law (hey, they were just little kids).

However, in recent months there has been a flood — highly visible in television stories — of teenagers from Central America illegally crossing the border. They know they’re violating the law, and many say they expect amnesty. They’re a different and less attractive bunch of potential beneficiaries.

Many polls show majorities, even of Republicans, favoring some form of legalization. Support may have increased since net migration from Mexico fell to zero in 2007-12.

But the apparent threat of a wave of amnesty-motivated, low-skill workers coming into a nation with lingering long-term unemployment changes the political balance away from legalization. Cantor’s defeat puts the kibosh on any legalization bills this year and probably indefinitely, if Republicans hold the House.

The third lesson of Cantor’s defeat is that campaigning against “the entire crony corporate lobby” wins votes, and maybe not just in Republican primaries.

Cantor, like his predecessor Tom DeLay, has raised lots of money from K Street lobbyists. He infuriated some conservatives when he blocked a floor vote on flood insurance (which subsidizes affluent Florida and other coastal dwellers) and he has pushed for reauthorization of the Export-Import Bank (which aids Boeing and Caterpillar).

There's a strong case, made persistently by my Washington Examiner colleague Timothy P. Carney, that crony capitalism violates the principles of both free-market conservatives and redistributionist liberals, as well as the principles of democratic fairness.

David Brat’s victory shows the strength of the case against crony capitalism — and gives Republicans an early lead on a theme which could be profitably raised by either party.