my son himself used to speculate about the education system and thought a network of smaller schools closer to home might work better than the fewer, larger schools we have here. Of course then you get into the argument about economies of scale, ranges of subjects offered etc, though I suppose with online learning these might not loom so large.
Ah, yes, practical constraints often limit what the best approach would be.
My former school district was relatively small (four K-8 schools and one high school). The 6-8 parts were fundamentally separate middle schools existing on the same campuses as elementary schools. In the very old days, when the district had loads of cash, it could make four small middle schools work with complete programs. As money became more scarce, it became harder and harder to do that. A few years back, the district created one middle school because it just couldn't offer complete programs any more. There was some discussion of making the middle schools magnets for different subject areas, but that proved to be too complicated to set up. (And kids that age often changed their mind about what they wanted to focus on, a potentially even bigger problem.)
I've seen the same problem when large schools suffer declining enrollment. The smaller the student population, the more tendency there is to lose programs because not enough of the remaining students are interested, and the more difficult it is to schedule students. (Classes that used to be offered every period no longer are, and more classes are offered only once, forcing a lot of tough choices.)
With regard to online classes, they are a good supplement, but I've yet to see an online program that provides everything in-person schooling can. The personal touch really makes a difference, especially for struggling students.