In the Microsoft boom years of the 1990s, Andrew Coulson gave up a highly lucrative career as a software engineer to take on one of the country’s most perplexing problems: Why does American education make so little progress? Between leaving Microsoft and his untimely death last year, Coulson intensively studied education history, research and policy. “School Inc.,” a documentary now airing on PBS, is his magnum opus.

What Coulson reveals in his three-part exploration is that American education produces a lot of frustration, but too little learning, because public schooling — schools funded and run by government — curbs the freedom of parents and educators. Though the intentions behind public schooling are very much the opposite, the top-down, bureaucratic system stifles innovation and accountability, and keeps great teachers from taking excellence to scale.

School Inc.” starts right here in the United States, where many believe education has always been, and must always be, provided by public schools. Historically, that is just not the case. The “common school” movement did not begin until the late 1830s, but more than 90 percent of white adults were already literate by 1840.

Where were they educated? Often in private schools, including the for-profit kind. Sadly, widespread education did not reach all groups, but that was, in part, because in many states African Americans were legally — and disgracefully — barred from receiving an education.

Turning to the modern world, “School Inc.” takes viewers to South Korea, a country perched near the pinnacle on international exams. There, for-profit tutoring services called “hagwons” — frequented by an estimated 95 percent of students before they graduate high school — dominate education. What’s the secret to their success? They must attract and keep business, forcing them to be highly responsive to students. Of course that requires effective teachers, and those teachers can get paid a lot — one profiled in the film made $4 million in a single year! Meanwhile, Americans haggle over collectively bargained public school teacher salaries averaging just $58,000.

Not all is terrific in South Korea: College entrance exams can essentially determine the path of a student’s life, making the pressure to do well immense. Nevertheless, it is the for-profit tutoring sector that appears to give families what they want and need.

A very different place embracing freedom in education is a country many might consider a socialist utopia: Sweden. Even there, people accept the concept of profit in schooling, and the for-profit schools such as those in the Kunskapsskolan network seem to work well. Indeed, research suggests that the more competition a public school faces from for-profit institutions, the better the public schools do. Perhaps just as important, these schools provide real pedagogical alternatives to the public schools and to each other, helping parents match the needs of their unique children to the settings best for them.

But what about the poor? The profit motive works for them, too.

For many of the world’s poorest people, for-profit schools are providing better education than “free” government institutions. “School Inc.” also examines the work of researcher James Tooley, who has studied education in numerous impoverished places, including Hyderabad, India; Lagos, Nigeria; and Gansu Province, China. Tooley has found that parents using their own money are highly attuned to the effectiveness of the schools, and profit-seeking educators must respond to those parents to stay in business. This may well be why Tooley has repeatedly found that private schools in such places outperform public institutions on language and math exams, even after controlling for family income.

Freedom, including the ability to make a profit, is crucial to having an education system that works well for children right now, and achieves dynamic, continuous improvement. That is the conclusion Andrew Coulson reached in his studies of education through time and space, and it is what he makes clear in “School Inc.

It is a lesson we all need to learn.