It's not a fair comparison, of course, because the money spent on schools is (supposed to be) for the benefit of only one segment of the population: children between the ages of 5 and 18. Military spending is (presumably) for everyone's benefit, however that is measured.
The reality is there are powerful, moneyed interests with a stake in sustaining and increasing spending in both areas, as it's their bread and butter.
The taxpayers have virtually no representation in Washington and very little in the individual states, so which way do you think elected officials are going to lean?
Republicans don't get much money from the NEA and AFT, but you wonldn't know it by their votes on NCLB and other schemes to put all government schools under federal mandates.
You are correct because one of the fundamental responsibilities of government is to defend the borders from begin overwhelmed by armies or refugees. Having a military defense is absolutely necessary( The other responsibilites are to provide honest courts and to put criminals in prison.) Schools however are **not** a fundamental responsibility of a government.
However....The comparison does help to hammer home how much we are spending on the K-12 socialist schooling.
The money drained from the private sector to support socialist entitlement schooling would otherwise be used to create wealth and health for all to enjoy around the world. This sick socialist system of schooling also ensnares armies of American citizens as employees and vendors to the schools, and their creativity is removed from the private sector.
And....I also agree that Republicans walk hand in hand with this socialist schooling monster. I fear that only complete collapse will bring Americans to their senses.