The law demands that young people go to school because society has a clear interest in making sure that they do. Elementary through secondary education provides (or is supposed to provide) students with basic skills that they need to become productive members of society, in whatever way they choose to produce. The benefit to society as a whole outweighs the cost to the state. To the individual student, the reality is that one's options in life are almost always dependent on the amount of education they have. As some of observed, it is possible for people to be successful without an education, but they have fewer options, and have to work even harder to overcome it. Another reality, beyond the obvious importance of simply not being ignorant, is that jobs in our society are becoming increasingly specialized, and they often demand certifications and other credentials that are simply unattainable for anyone without education.
School is designed to create healthy, productive, and well educated citizens. You have to go to school so you can learn and be part of society. Some things you might be able to learn as you move through life, but other things really have to be taught at some point. You learn more in school than you realize. School helps us learn to get along with other people and helps us learn social skills. It teaches us to problem solve and develops those types of skills that we use without even realizing it. We learn to follow rules and sometimes when we should break rules. Of course there are the academic aspects to consider as well. We learn enough basic knowledge in many subjects that will allow us to build on that knowledge later in life. The well rounded nature of the curriculum also helps us determine what we like and what we don't like. This can help lead us to find a career path. The bottom line is that we go to school to learn, to grow, and to become a productive member of society.
There was a time when people could function in society, on a personal and economic level, without school. But that day is now far in the past. Our society is so information-based that you wouldn't be able to do anything except the most menial tasks without a formal education. You have to be able to do simple math, you have to be able to communicate in writing, and you have to understand something about the country in which you live to be a productive citizen.
Because if you don't go to school you remain ignorant. If you remain ignorant, you have fewer opportunities in life. It is certainly true that some people can get rich without going to school. But most people who don't go to school make life very hard on themselves. They end up doing the hardest, least satisfying jobs for the lowest pay.