In my experience (granted, that is limited to a dozen or so districts in two states), they used to focus on the top end students because a) they were well-connected compared to their peers, b) they came from the higher income (and therefore higher property-tax) portions of the district and were therefore more well connected to local funding source, and c) had parents that were savvy enough of systems such as education to advocate strongly for their children.
>ideally, every student should have a roughly equal amount of attention and dollars allocated to them and if a school is underfunded, everyone suffers until the problem is remediated.
The problem is that this is sort of what happens right now, and it's not great. The current funding scheme relies disproportionately on local property taxes, which only serves to exacerbate the effects of inequality. The current system is a warehouse for student bodies, with oversize classes, underfunded supplies, underpaid teachers, and too many unfunded mandates.
Ideally, we figure out funding (that's way above my pay grade), and then we can move on to cross-ability grouping. Seriously, it's just a fact that high achievers learn much better when they are left to (roughly) their own devices, with guidance and outlines for progress as appropriate. Low achievers learn better when they are led through the process by someone who can put the language in terms they can understand; ideally with support outside of the teacher, such as from peers (look up supplemental instruction for a model in there). Middle achievers will consistently live up to the exact expectation you place on them; so they need a system and environment that places increasingly more strenuous expectations on them, both socially and educationally.
Combine all of that, and you have a wonderful cross-age, cross-ability classroom focused on social development as well as academics. The ability to specialize for various fields such as STEM, art, or technical education is just built in, as well!
If anyone is interested in funding my charter school idea - it's a neighborhood based one-room-schoolhouse model where education and learning are led by the abilities and desires of the students. Much free time, much outdoor time, and incorporating everything in the above paragraph. Completely unrealistic for public schooling in the united states due to the inordinate per pupil cost. But just a lovely idea.