I used to think this way, but some experiences made me realize it's not so cut and dry.
When you have a class size over 20, teachers are forced to be a lot more systematic, which can improve the effectiveness of their teaching. Good teachers make heavy use of social proof. When I tried to teach my kid at home, it was a struggle. But when the kid is around his peers in a classroom, and they are going along with the teacher, he naturally falls in line with no cajoling, etc.
If there were only 5 students, the likelihood he'll just go along with things is much lower.