The answer to this question depends on who you ask. If you had asked the people responsible for compulsory public education in America, they would have said, “To train factory workers to do what they are told.” The other less publicized purpose was to “produce” workers who wouldn’t make waves or ask too many questions — in other words, who were satisfied with their lot in life working for, and making money for, their employers. Have things really changed that much?
For a deeper discussion into the meaning and purpose of education, you may wish to check out this article. Bottom line is that 1.) there is no consensus definition of education; and 2.) there is no agreement on its purpose. And we wonder why we’re in trouble?