When I was in school there were a number of kids who had flunked every class. They had flunked in grammar school and were put in highschool to get rid of them. Once in highschool they did nothing. They got into trouble and were unconcerned with being kicked out of school. Given the choice of being paddled or leaving school for a few days they were happy to leave the school. These unfortunants contributed nothing to the school so why have them there in the first place?
How do schools handle this these days?
I never understood the idea of having a single-tracked secondary education system either, as the US has. By comparison, the Netherlands has a three/four track system from the age of 12 (
wiki link), ranging from a combination of trade school and general education (VMBO) to a general education preparing for university (VWO).
I do understand the need for compulsory education. Some basic skills are simply needed in this society. Virtually nobody "makes" it in society without, e.g., being able to read. The car mechanic has to read the instruction manuals from the manufacturer, the cleaning lady must be able to read the label of the detergent she uses, etc; not to speak of the things you have to read to just be a citizen. Of course, those basic skills go further than just being able to read and write.
Many kids don't see that need when they're in school themselves - who'd have thought that high school kids would not have the judgement to see how the knowledge they can gain at that moment would be beneficial 5, 10, 20 years down the line?

Unfortunately, some of their parents, especially from socially poor backgrounds themselves, don't see that need either.
As a society, you can make a choice. Either let the kids drop out prematurely and have little chance to contribute to society by a honest-to-god career, and high chance to either live on welfare, to beg in the streets or to become a (petty) criminal. Or go to pains to keep the kids in the system and give them a decent starting point for a professional career.
I know what my choice is.