What gives the government the right to declare that something is "good for socialization" and legislate away every other option?
The government absolutely has the right to do so, but that rationale would be in error. There is little reason why school must be the focal point of socialization. Sports, music, clubs, scouting, arts, church, etc. are all valid routes for such. In fact, the public school environment can be very damaging to socialization; middle school was the worst experience of my life and set me back years in making friends and simple conversational skills. Not to mention issues involving drugs, teacher quality, bullying are all real issues. Parents may not be the best qualified on some subjects, but homeschooling is rarely done in isolation.