1) Only a very few people are expected to be able (time and competency) to give a general education to their children, unlike feeding/housing.
2) Let's be real, it's not just socialism/charity, one of the major reasons for compulsory education is shaping malleable young minds (for good or bad, mind you).