Even "bad" schools use this strategy to move some of the "good" kids into special programs, etc. to raise their average scores. Which makes the remaining classes even worse. It's an eternal struggle between raising the floor vs raising the ceiling

It's also a feedback loop, once you're known for "good schools" then the homes become more expensive. If you don't care about moving then it's often cheaper to buy a home to send your kid to a good public school vs. sending them to private school.