Statistically, "gifted" kids are the most likely to be pulled from public schools if the parents don't think that their kids needs are being met. Schools with low quality "gifted and talented" programs tend to lose a large percentage of "gifted and talented" students to other public schools with better programs, or to private schools. The parents of these kids tend to be far more proactive than the typical parent in ensuring that THEIR kid gets into a program that challenges them.
Decades ago, many schools just shrugged their shoulders at the problem. If the kids wanted to leave because their programs weren't good enough, they could just leave. Nowadays, with standardized testing as the national norm, the average test score of an entire campus can have a HUGE impact on a schools funding and leadership. To keep their average up, the schools do everything possible to retain high performing students. The schools extra investment in "advanced" teachers for these students is seen as worthwhile if it increases the funding for the overall school.
I have to admit that I'm guilty of this myself. My daughter was in GATE for most of her elementary school years. When her original school cut GATE because they couldn't afford it, we transferred her to a different school that had the program. Nearly all of the kids in her class the previous year transferred as well. I have no idea what the actual impact was on the schools overall standardardized testing score, but it couldn't have been good.