Aside from the wisdom of obliging every single young person to serve out such a sentence — conveniently, until draft age, when the State may have other plans for their time — there’s an interest-group angle. Ira Stoll traces it to the National Education Association, which stands to gain from the idea a measurable boost to its dues-paying ranks, and which has in fact proposed mandatory schooling for nongraduates up to age 21. More: Hans Bader, CEI (quoting Overlawyered commenter Kurt); Nick Gillespie, Reason.
P.S. Watch out for the truancy cops, too [Free-Range Kids; Loudoun County, Va. mother says she was handcuffed and arrested after fifth instance of school tardiness]