“In this maelstrom, the most clarifying voice has been the voice of business,” he said. “These C.E.O.s have taken the risk to speak truth to power.”

This transformation didn’t happen overnight. Chief executives face a constellation of pressures, and speaking up can create considerable uncertainty. Customers can be offended, colleagues can feel isolated and relations with lawmakers can suffer. Words and actions can backfire, resulting in public relations disasters. All this as a chief executive is expected to constantly grow sales.

Even this past week, it was easy to discern careful calculations made by executives who chose to speak out against Mr. Trump. Many faced calls to resign from the presidential advisory councils, and the prospect of boycotts if they did not.

But they also faced notable and new kinds of pressure from within — from employees who expect or encourage their company to stake out positions on numerous controversial social or economic causes, and from board members concerned with reputational issues. In the past week, business leaders have responded with all-staff memos and town-hall meetings.

In short, while companies are naturally designed to be moneymaking enterprises, they are adapting to meet new social and political expectations in sometimes startling ways.

“Not every business decision is an economic one,” said Howard Schultz, the chairman of Starbucks, who was one of the country’s first company leaders to proactively address social issues. “The reason people are speaking up is that we are fighting for what we love and believe in, and that is the idealism and the aspiration of America, the promise of America, the America that we all know and hold so true.”

Looking for Controversy

Companies have reckoned with issues of race, class and gender for generations now.

On Feb. 1, 1960, four black college students sat down at the segregated lunch counter at a Woolworth’s store in Greensboro, N.C. The civil rights sit-in movement was born, and five months later, Woolworth’s desegregated.