One of Malcolm Gladwell's books made a convincing argument that reducing class size quickly runs into the issue of diminishing returns. A cursory Googling suggests there's plenty of research to back it up[0][1]
The effectiveness of in-person learning may have more to do with social interaction and peer motivation. A teacher with about 20 students who is able to create a general excitement for learning in the class seems to be the most effective. A classroom where the "spirit" of learning is alive is ideal for a lot of kids.
[0]https://edcentral.uk/reading-list/431-what-we-have-learned-a... [1]http://hanushek.stanford.edu/publications/evidence-class-siz...
it works out really well for the student. instead of working a regular job during the year you get to do something that benefits your career, you build a relationship with your professors and it pays more than if you were working at the local grocery store.
https://biosciences.uchicago.edu/content/teaching-assistant-...
> All graduate students are required to serve as a Teaching Assistant in at least one course for academic credit before the Ph.D. degree is awarded. Appropriate courses may be undergraduate, graduate, or medical, but must be in the Biological Sciences Division (exceptions may be made for students in the Biophysical Sciences program).
I imagine a huge factor is also parental involvement, when it comes to encouraging students to set aside several hours each night for study and homework. In the absence of parental involvement or in cases of parental neglect and indifference (woefully common in many situations), the role of the teacher becomes far more important in encouraging the student to develop good study habits. This might be more difficult in the online situation.