In general, I think this is a good idea. My experience tells me that I am far more likely to learn when placed alongside people at a similar (or slightly higher) level. For an academically capable person, there is nothing more infuriating than being trapped in an environment with no real peers.
Needless to say, however, our current system of ability sorting is far from complete. There are some very smart (and very dumb) people almost everywhere. Students choose universities for financial or personal reasons rather than academic strength alone. This makes me wonder: what is the optimal level of ability sorting?
Many models will say that we should have perfect ability sorting. But regardless of whether perfect sorting would be desirable, it's clearly unrealistic: there will always be frictions and informational asymmetries that keep us from achieving it. A better question, then, is this: if some imperfection in ability sorting is inevitable, what is the optimal policy given that imperfection?
The intuitive answer is that we should come as close as possible to perfect ability sorting. But depending on our model, this isn't necessarily true at all; even if perfect sorting is the first-best solution, once imperfections exist it may be optimal for us to add additional noise to the sorting process.
To see why, suppose that there are two universities in the world, A and F, and two types of students, Good and Bad. In an ideal world, all the Good students attend university A while all the Bad students attend university F. Imperfections in the sorting process, however, mean that at best 1% of the students at university F will actually be Good. Now consider a policy that shifts students so that 2% of university F will be Good. Obviously, the students who moved from university A to university F will be worse off. The Good students who were already at university F, however, will be better off—they have a larger group of Good peers to learn from. It's entirely possible that the second effect will exceed the first. In other words, as long as university F has some Good students, it's possible that the benefits from providing a "critical mass" of Good students outweigh the harm to the additional Good students moved to university F.
Broadly speaking, this is an example of how the second-best policy solution may involve deliberately moving away from the first-best solution.