“And once you’re in the cross hairs, it is hard to get out,” Mr. Smith said.

The natural tendency for the young tech powers is to fight. “They didn’t get to where they are by compromising,” Mr. Smith said. “They got to where they are because they stuck to their guns. And so they tend to think they’re right and the government is wrong.”

That mentality is especially true for immensely successful and wealthy founders. The Microsoft co-founder Bill Gates, according to Mr. Smith, “learned that life actually does require compromise and governments actually are stronger than companies,” if only after a bruising confrontation.

Mr. Gates, who wrote the foreword in Mr. Smith’s book, recalled that for years he was proud of how little time he spent talking to people in government. “As I learned the hard way in the antitrust suit,” he wrote, “that was not a wise position to take.”

At Microsoft, Mr. Smith pushed for the new path. Horacio Gutierrez, a former senior Microsoft lawyer, who is now the general counsel of Spotify, said, “We went from dealing with governments in a reactive, defensive way to reaching out and being proactive.”

As Mr. Smith was cleaning up Microsoft’s legacy of legal troubles, the tech industry was moving on. The personal computer was no longer the center of gravity, displaced by smartphones, internet search, social networks and cloud computing.

“What you saw at Microsoft was acknowledging reality and a response to changed circumstances,” said A. Douglas Melamed, a professor at Stanford Law School. Microsoft is not in a spotlight of criticism today, he said, “largely because the company is not dominant in visible ways as it used to be.”