(Photo by Joshua Austin on Unsplash)

The sudden dismissal of the CEO of McDonald’s over the weekend showed in dramatic fashion that the codes of conduct for top management in Corporate American have risen sharply. The fast-food chain announced on Sunday that its board of directors had fired CEO Steve Easterbrook after he engaged in a consensual relationship with an employee, violating company policy.

Other CEOs have been fired for sexual misconduct in recent times, but in the case of CBS CEO Les Moonves, the accusations included harassment and retaliation, and in the case of Mirage Resorts CEO Steve Wynn, charges involved multiple cases of sexual assault.

At McDonald’s, company policy forbids managers from having romantic relationships with direct or indirect subordinates. “Other companies don’t always act on that kind of information or fire their CEO for that, and so it seems like they are trying to enforce a pretty strict policy in this situation,” University of Richmond Law Professor Carl Tobias told Fortune. In the case of a CEO, everyone on the payroll is effectively a subordinate.

Easterbrook, who is 52 and divorced with three daughters, acknowledged in an email to employees that “this was a mistake. Given the values of the company, I agree with the board that it is time for me to move on,” he wrote. He will be replaced by Chris Kempczinski, most recently the president of McDonald’s USA.

The ousted CEO had generally been credited for launching a turnaround at McDonald’s, which had been under competitive pressure from fast-casual restaurants and food-delivery apps. “There’s no question he’s been a very good CEO during his time there,” Jonathan Maze, editor of the trade publication Restaurant Business, told the New York Times. “He really made that organization a lot leaner, they make decisions a lot more quickly,” he said. “They have gone from a company that was well behind on technology to one that is arguably at the forefront of things like artificial intelligence and delivery.”

Even so, McDonald’s has faced criticism for low wages for its front-line workers and a failure to address sexual harassment. As the Times reported, “Tanya Harrell, a McDonald’s worker in New Orleans who has helped lead the campaign for a $15 minimum wage, said workers had filed dozens of complaints with McDonald’s demanding that the company take action to address sexual harassment. McDonald’s has ignored the demands, Ms. Harrell said, including requests to sit down with workers to discuss the issue.”

The company has lately been offering training programs to U.S. employees in an effort to prevent sexual misconduct, but the extraordinary case of firing the CEO may send a strong signal in its own right. In an email to employees, the new CEO Kempczinski wrote, “Yes, we serve delicious food and offer great experiences, but our brand means so much more. We stand for opportunity and empowerment for everyone.”