Heidi N. Moore is a business editor and consultant. She has been an editor, columnist and reporter for publications including the Guardian U.S. and the Wall Street Journal.

Guns for sale at a Dick’s Sporting Goods store in Stroudsburg, Pa., on Feb. 28. (Eduardo Munoz/Reuters)

Morality is easy when it costs nothing. That is a good principle to keep in mind as more than a dozen companies bathe in the glow of public approval after noisily abandoning their ties to the National Rifle Association this past week. Delta, Hertz, Avis, Budget, LifeLock, MetLife — these and other brands renounced their relationships with the NRA; Dick’s Sporting Goods promised to stop selling assault weapons and jumped into political advocacy with a slate of gun-control measures it urged lawmakers to adopt. On Facebook and Twitter, grateful activists encouraged people to reward the companies for their brave stances: Rent cars, buy airplane tickets, take out insurance policies. The mayor of Portland, Ore., praised Dick’s and called on other companies to follow suit. “Support retailers that do the right thing,” urged Brian Fallon, an influential Democratic political consultant.

But this isn’t heroism, shareholder activism or even corporate social responsibility — it’s plain old business. Dick’s won the most praise online for ending AR-15 sales. (Parkland shooting suspect Nikolas Cruz bought a gun at Dick’s, the company said, though not the infamous AR-15 he allegedly used in the rampage.) But Dick’s has previously made — and betrayed — this promise. The chain suspended sales of assault weapons in late 2012, after the Sandy Hook Elementary School shootings, but it reversed course within eight months when it decided to sell $800 AR-15s at its Field & Stream stores. The CEO had to clarify this past week that the company would now “permanently” stop selling assault weapons, perhaps to distinguish the new move from the temporary precedent.

The truth is that giving up these sales is unlikely to be a financial sacrifice for stores like Dick’s. Gun sales are falling, according to a widely used industry proxy: FBI background checks were down more than 8 percent in 2017. Dick’s maintains 719 stores in 47 states but only 35 Field & Stream stores in 16 states. And the company is well aware that “any improper or illegal use by our customers” of guns or ammunition sold by Dick’s “could have a negative impact on our reputation and business,” as it acknowledged in its 2016 annual report. Walmart stopped selling assault weapons in 2015 — not out of principle, the company said, but because customers weren’t buying them. Brian Rafn, director of research at Morgan Dempsey Capital Management, told CNN Money this past week that so many stores sell military-style assault weapons, “a few guns here or there at Dick’s isn’t going to make a difference” to the consumer market. After all, school shootings have been a growing problem since Columbine in 1999. In the ensuing 19 years, no companies cut ties with the NRA, pulled back discounts or declared their independence from gun manufacturers. For 19 years, they didn’t have to.

There are some companies for which guns and the NRA are a pretty solid revenue stream. Predictably enough, those are not breaking off ties with the gun industry. FedEx, one of the most famous holdouts, makes gun-shipping accommodations for 86 firearms manufacturers and dealers, as well as the NRA, according to a company document obtained by ThinkProgress. That is revenue FedEx doesn’t want to give up, especially to a competitor. There’s profit at stake, so it’s not making any brave stands.

FedEx will have to face public disapproval and reputational risk to keep that profit. Alyssa Milano and other celebrities, social media influencers and activists staged a one-day boycott Thursday of FedEx and two other large companies that still have business dealings with the NRA: Amazon and Apple . (Amazon founder and chief executive Jeff Bezos owns The Washington Post.) Of course, there are plenty of people who don’t particularly care what Milano does and strongly oppose gun control, so such actions are unlikely to affect those companies’ bottom lines.

Still, support for gun control has surged to its highest point in 25 years (68 percent favored it in one recent poll), and the NRA is viewed increasingly unfavorably. So for companies that see the gun trade as a marginal part of their business, the activism around the Parkland shootings presents an opportunity. It costs these companies almost nothing to stop offering discounts to the relatively paltry membership of the NRA, and in exchange, executives can win a reputation boost and customer goodwill you can’t pay for. In fact, companies know that such accolades are all too easy to buy — and they’re pretty cheap: None of the corporations siding with gun control are taking a particularly controversial stance. People who care deeply about gun rights are high-intensity issue voters (that is, their feelings about the problem can dictate which candidate they back), but they are relatively few in number.

Meanwhile, the Parkland shooting made pressuring the NRA a conventional opinion, and there is nothing better for a company’s bottom line than supporting a conventional view. An eloquent, quick-witted group of young survivors has created a new political and moral electricity. In only two weeks, regulation of assault weapons — thwarted and danced around by lawmakers for years — has become an urgent and mainstream concern.

It’s always been good business to avoid angering customers (a cautionary tale for executives is what befell Coca-Cola in the 1980s, when activists urged a national boycott of the company for doing business in South Africa, which was then under apartheid), but silence or neutrality on social issues used to be the prudent course, writes Dartmouth business professor Paul Argenti. “Today, however, many employees and consumers — especially millennials — expect, and even sometimes demand, that corporate leaders speak up.” Nearly half of millennials, 47 percent, in recent research said they wanted CEOs to express an opinion on important issues. “If done right,” Argenti writes, “CEO activism can be in­cred­ibly effective with far-reaching influence that can translate to the bottom line.” According to one study, 51 percent of millennials are more likely to buy from companies with activist CEOs, up from 46 percent in 2016.

The purpose of the threat of boycotts is to turn the free market into the regulatory body it was promised to be. To force the companies to recognize a higher financial power than the NRA — consumers — and to bring them to heel before the power of consumer dollars. In return, the companies that oblige and break off their NRA ties not only get to keep most of their business but perhaps gain even more. This arrangement is entirely sensible. It’s smart but not especially brave to see on which side your bread is buttered. It’s the easiest thing in the world to find your moral center when a pivot to ethical behavior results in widespread approval. That is why what happened this past week was not a brave moral stand by America’s corporate sector. The companies understand that it is a transaction — and consumers should understand that, too.