It's nominally the law in my state too, but apparently it's fine to weed out the "non-performers" i.e. whoever you want. Public schools then have to take on the extra burden of the "undesirables".
https://www.nytimes.com/2015/10/30/nyregion/at-a-success-aca...