Magnet schools are not fine ,because they’re still allowed to be selective; they don’t have to take people with disabilities, for instance. Since they can take students based on testing, they’re able to weed out students that come from less well-performing public schools, which tend to be more urban, and more non-white. And because they’re structured around a particular field, they’re able to structure themselves so that they can be maximally beneficial to people that are already well-off.
There’s no reason to not put those same programs within an existing public school system, unless the goal is to make public education less accessible to families that aren’t already well off.