If this were a lottery for elite high schools or colleges, then I would have a bit more hesitation. But since it's middle schools, I think it's a good idea to at least give it a go.
There's pretty strong reason to believe that academic achievement is influenced by a multitude of factors, including (but not limited to) innate capabilities of the child, socioeconomic background of the family, parental involvement in school work outside of class, quality of nutrition, physical security of the child both in school and outside of it, availability of enrichment classes outside of basic core material (art, dance, choir, etc), quality of teachers and their involvement with students, size of class and individual attention.
Some of those can't be controlled for by a school. The home-life aspects are outside of what a school can influence. But other elements can be addressed. An elite school is likely to have better teachers, more enrichment programs, smaller class sizes, less exposure of students to criminality during school hours, more nutritional student lunches and food options, as well as probably having many more options for after-school activities.
High achieving students are likelier to have wealthier parents, in better neighborhoods, with more parental involvement, better overall nutrition, and secure lower-risk home lives. It's very reasonable to assume that those high-achieving students won't be materially harmed by not getting a spot at the elite middle school. They'll still be high performing students in their regular public school, and will still likely be in a more advantageous position going into high school.
Lower achieving students, on the other hand, are likely to be a broader mix from simply less intelligent but otherwise well-positioned students, to students coming from highly disadvantaged home lives with other socioeconomic barriers to their progress. I think it's reasonable to assume that providing access to those disadvantaged students could provide them with a definite leg up and the ability to flourish and become high achieving students by addressing some of those challenges.
It won't work on all kids, sure. But the opportunity to progress for some is very high, whereas the potential reduction in progress to others is minimal. It would at least give us a solid starting basis to determine how much influence the school can have over the socioeconomic and home-life effects that hamper achievement.