Based on a law passed during the Nazi era.
Actually, compulsory and free education to the 8th grade in Germany....dates back to the Prussian government period 1870s-1919. The Nazis did a lot of stuff....but this one (like a number of gun laws) were already on the books before they showed up in 1930.