In the end, it was a landslide. The United Auto Workers (UAW) pulled out all the stops to unionize a Nissan Motors automobile assembly plant in Canton, Mississippi. Yet after a bitter campaign, it lost convincingly, by a 62-to-38 percent margin, with 2,244 employees voting against and 1,307 for unionization.

Prior to the vote, the UAW had rolled out the heavy artillery, enlisting the support of Senator Bernie Sanders and Democratic National Committee Chairman Tom Perez, as well as a raft of left-leaning Hollywood stars and a large cadre of skilled union organizers.

Their expensive and well orchestrated campaign hammered home this familiar union theme: workers will only receive fair treatment on the job if they join forces to resist management, which seeks to wring every last cent out of its captive workers.

Trending: Man Pictured at Charlottesville Rally Wants You to Know He's 'Not an Angry Racist,' Just Marches With Them

The UAW hoped that success in Canton would give it an entry point in the union-resistant American South, where it might augment its membership rolls, which have plunged from about 1,528,000 workers in 1980 to about 409,000 workers in 2015.

And if the UAW could make a comeback, perhaps other unions could rebound as well and reverse the long-term trend: Union membership in all market sectors, public and private, has dropped from about 35 percent of the work force in 1954 to about 11 percent today—all with no major change in the statutory framework governing labor relations.

Ultimately, the UAW in Canton was outgunned by two forces.

The first was the Nissan management team, which pressed the workers hard on a simple theme: why rock the boat when the wages and working conditions at the Canton Nissan plant are far better than anything else available to the employees?

RTS1A583

Nick Carey/reuters

Story continues

The second was the workers themselves.

Nissan workers earn on average $25 per hour, far higher wages than they could garner from alternative local employment. Those wages are stable because they rest on productivity gains, which endure, and not on monopoly power, which can be cut down by more efficient rival firms.

Getting this message across requires staying on the right side of a fine legal line. The national labor law’s guidelines for elections require employers, including supervisory employees, to bring a grammarian’s touch to their political messaging.

Don't miss: Charlottesville Rally Organizer Blames Police For Violence, Claims White Supremacists Were Victimized

Statements of fact and predictions of future affairs are fair game for union elections, but threats of retaliation against employees, whether express or implied, count as unfair labor practices, which could expose an employer to a reelection even after winning.

Indeed, in Nissan’s case, there may yet be a second round, given that UAW Secretary-Treasurer Gary Casteel railed that “Nissan waged one of the most illegal and unethical anti-union campaigns that I've seen in my lifetime."

The magnitude of the union’s loss suggests that employers like Nissan are in a good bargaining position. They have potent rejoinders to union promises of higher wages, greater benefits, and greater job security. Management can tell the workers in plain language that the issues they face are structural, not personal.

Gone are the days when a tariff wall protected American auto workers against foreign imports like a fortress. Once the Japanese, Korean, and German firms gained access to American markets, the bargaining landscape was transformed. Raising wages raises production costs, which could price Nissan cars out of the market, with catastrophic losses for workers, their local managers, and Nissan shareholders.

These trade-offs were not lost on the astute Nissan employees. On the positive side, the union could gain somewhat better terms for union members at the bargaining table. But on the negative side, the union takes a cut of worker salaries in the form of substantial union dues. Nor do unions run on pure oxygen, for their operations require at least some level of uncompensated employee participation.

Winning short-term gains also increases the risk of workplace disruption from strikes, plant closings, and lost work, all of which can happen if the contract is too favorable to employees.

It is no wonder that Nissan management had the vocal support of a strong cadre of pro-management workers who foresaw too much risk from unionization. All economic alliances are uneasy, but the Nissan workers concluded that management, not union leaders, would better enable them to secure their long-term survival and success in a global marketplace.

And the unions know all this too. This is why they pushed so hard in the early Obama years for the misnamed (and temporarily shelved) Employee Free Choice Act (EFCA), which would have allowed unions to circumvent secret ballots in elections.

Most popular: What Is AntiFa? Anti-Fascism Protesters and White Power Groups Were Battling Long Before Charlottesville

The unions know that many workers are reluctant to object to unionization publicly but will vote against unionization in a secret ballot of the sort that happened in Canton.

EFCA’s proposed card-check arrangement would spare unions from the dangers of elections, and it would also force employers to accept an initial two-year contract through compulsory arbitration on a bargaining field tilted heavily in the favor of the unions.

The current legal arrangements under the National Labor Relations Act generally allow a well-run management team to beat back a well-run unionization effort. There is a larger pie for management and labor to divide if the union does not get to play a role.

To be sure, the current legal rules are a tangled mass. I have long argued that the pre-New Deal labor law that allowed employers to enter into “yellow-dog” contracts under which individual workers agreed not to join (or promise to join) a union while on the job gets rid of most of this clutter. The employer knows that it faces competitive pressures, so it has to keep workers from quitting.

But freed of union shackles, it can expand its workplace without having to negotiate a costly administrative apparatus under which the National Labor Relations Board oversees virtually every aspect of management, union, and worker relationships.

But whatever the defects of the American labor, they pale in comparison to the situation in France and other European countries. The key difference in the two systems is that most of the elaborate French code on employment is embedded in a huge work code, the Code du Travail , which, from its inception in the early years of the 20th century, was a socialist document treating all employers as enemies of the working class whose conduct had to be checked every step of the way.

The current tome contains 3,324 pages, with detailed rules for every aspect of the employment relationship, from hiring to firing. These dense, general rules are then compounded by detailed rules for each specific industry. Squeezing the entire employer-employee relationship into a nationwide omnibus code makes it impossible for individual firms like Nissan to finesse the brunt of the labor law by beating back a union’s organizing drive.

In France, the only path forward is to tackle the entire code through reform legislation. But current law produces enough winners among current workers that strong unions—most notably the militant left-wing CGT (translated as “the general confederation of labor”)—take to the streets to preserve the status quo.

The 2016 French national elections vaulted former investment banker Emmanuel Macron into the presidency on a promise to make significant modifications to the labor code. The question is whether his early crest in popularity can survive the rigors of confrontational politics, in which entrenched unions hold a lot of high cards.

The current conceit is that the Code has become obsolete over time, but the more accurate view is that it was always a huge political and economic mistake, whose costs have only increased as labor markets evolved from mass assemblages of workers on hourly wages to a protean workforce filled with gig workers and moonlighters.

Ideally, Macron should propose that France allow contracts at will—any worker can be fired or quit at will—knowing that the overall flexibility of labor markets will ensure a safe landing for both able firms and competent workers. That at-will regime largely survives in the United States apart from the labor and the antidiscrimination laws, and it has helped fuel the creation of innovative firms like Amazon, Facebook, Microsoft, and Uber.

But the need for legislative approval has forced Macron to seek out much more modest proposals that will reduce the costs of dismissal either for poor conduct or economic downturns.

The stakes are enormous, but unless and until France loosens the legislative labor noose, it can expect to retain its persistent 10 percent unemployment rate and a two-tier labor market in which the ins have huge protections, leaving the outs to fight over the crumbs.

France would do far better with an American regime under which workers in Paris could emulate those in Canton, Mississippi by saying no to a union and working directly with management.

Richard A. Epstein, the Peter and Kirsten Bedford Senior Fellow at the Hoover Institution, is the Laurence A. Tisch Professor of Law, New York University Law School, and a senior lecturer at the University of Chicago.

More from Newsweek