CEOs used to avoid politics, except on issues that directly affected their bottom lines.

Then came President Donald Trump, who wanted to burnish his credentials by rubbing elbows with fellow business leaders. His manufacturing and strategy councils, both of which were dissolved last week after a flurry of CEO resignations, were always mostly about image.

The executives could flatter themselves into thinking they were influencing the president, while Trump could create the illusion of strong support from a corner-office crowd that was deeply opposed to his trade and immigration agenda.

Some forum members had their own reasons for wanting some presidential access.

Hours before the councils were abolished on Wednesday, Lockheed Martin Chief Executive Marilynn Hewson told employees that the manufacturing group’s mission “remains critical to our business.”

She condemned hate groups, but a CEO with billions of dollars in military contracts on the line can’t afford to stand on principle. Boeing’s Dennis Muilenberg was in the same situation, as was Dow Chemical’s Andrew Liveris, who wants the Trump administration to approve a megamerger with DuPont.

The panels didn’t accomplish much in their short existence. The manufacturing council met once in February; the strategic and policy forum last met in April.

Charles Hoffman, dean of the University of Missouri-St. Louis business school and a former AT&T executive, said he saw little reason for the CEOs to join Trump’s panels in the first place.

“It seems like pure ego to me,” Hoffman said. “I guess it helps the company with visibility and PR perhaps, until there is a point when that PR becomes negative.”

That point arrived in the aftermath of the deadly hate-group rally in Charlottesville, Va., When Trump was unwilling at first to denounce the rally’s racist organizers, and when he later blamed “both sides,” his statements were hard to reconcile with values the CEOs preach to their own employees.

Diversity, inclusion and tolerance are core values of most modern companies. “If that’s what’s written on the door, as a leader you want to walk the walk,” says Dan Elfenbein, associate professor of strategy at Washington University’s Olin Business School.

He credits Merck’s Ken Frazier, the first to quit the manufacturing council, with forcing the other CEOs to think about the awkward position Trump had put them in. “Hats off to him for being the first,” Elfenbein said. “Strategy works only through consistency between message and action, and Frazier wanted to be consistent.”

Now that business leaders have distanced themselves from Trump, will they continue to speak out on social issues, or will they retreat to a bottom-line mentality?

Mark Mizruchi, a University of Michigan professor, is the author of “The Fracturing of the American Corporate Elite,” a book that traces the history of big-business involvement in politics.

He says corporate leaders were active in policy-making after World War II until the 1970s, including support for an expanded social safety net. Since then, globalization and activist investors have made their day jobs more complicated, while an ideological shift caused more CEOs to think of government as adversary, not natural ally.

The result, Mizruchi said, is a loss of influence for corporate America. “On the issues that require collective action, they don’t exercise the kind of clout they used to.”

Trump always seemed more interested in co-opting business leaders than in listening to them. His panels’ demise was a welcome reminder that, if it wants to, business can still be a moral and social conscience for the nation’s political class.