When I worked in the first Bush Administration In 1991-92, McKinsey consultants were everywhere. Gaggles of very young, well-dressed people marched in and out of the White House with briefcases and plans. McKinsey has advised school districts, given them business plans to fix their problems. Does anyone ever check up on how their proposals turned out? Do they ever admit failure? I never figured out what they were doing or why they were there. Like Pearson, McKinsey is always there, although there is no evidence that they are education experts. What seems to mark the McKinsey brand is a sense of certainty that they know everything and know how to fix everything. To learn more about the corporate consultants who advise on how to do everything, I recommend this book, The Lords of Strategy. Education has been warped for the past 30 years by the inappropriate application of corporate strategy to schools and classrooms and children.

Their biggest disaster was their role in South Africa, where they received a huge payment to fix the state-owned power company. They didn’t but collected a huge fee for their failure.

In late 2015, over objections from at least three influential McKinsey partners, the firm decided the risk was worth taking and signed on to what would become its biggest contract ever in Africa, with a potential value of $700 million.

And a bitter irony: While McKinsey’s pay was supposed to be based entirely on its results, it is far from clear that the flailing power company is much better off than it was before.

The Eskom affair is now part of an expansive investigation by South African authorities into how the Guptas used their friendships with Jacob Zuma, then the country’s president, and his son to manipulate and control state-owned enterprises for personal gain. International corruption watchdogs call it a case of “state capture.” Lawmakers here call it a silent coup. It has already led to Mr. Zuma’s ouster and a moment of reckoning for post-apartheid South Africa.

Yet despite extensive coverage of the scandal by the local news media, one question has remained largely unanswered: How did McKinsey, with its vast influence, impeccable research credentials and record of advising companies and governments on best practices, become entangled in such an untoward affair?

McKinsey admits errors in judgment while denying any illegality. Two senior partners, the firm says, bear most of the blame for what went wrong. But an investigation by The New York Times, including interviews with 16 current and former partners, found that the roots of the problem go deeper — to a changing corporate culture that opened the way for an aggressive push into more government consulting, as well as new methods of compensation. While the changes helped McKinsey nearly double in size over the last decade, they introduced more reputational risk.

It was also the biggest mistake in McKinsey’s nine-decade history.

The contract turned out to be illegal, a violation of South African contracting law, with some of the payments channeled to an associate of an Indian-born family, the Guptas, at the center of a swirling corruption scandal. Then there was the lavish size of that payout. It did not take a Harvard Business School graduate to explain why South Africans might get angry seeing a wealthy American firm cart away so much public money in a country with the worst income inequality in the world and a youth unemployment rate over 50 percent.

Why did they do it? Greed? Arrogance?