It's not, though. Kids with stay-at-home parents are still required to go to school. Compulsory education is near universal at this point, but at least in the American tradition, the first publicly-funded, mandatory schools were mostly for instilling community values into kids, and this was in communities where women weren't even allowed to work outside the home. Kids were actually expected to learn reading and math at home before they even started school.
History isn't the present, but the reason most laws exist today is just inertia, not some principled stand of the legislative bodies that might otherwise be able to repeal them.