As far as I can tell school districts arose at a time when it was completely impractical for children, other than those whose parents were wealthy enough to send them away to boarding school, to attend a school that was not local, and at a time when it was generally believed that local government should be responsible for local services (sanitation, roads, water, schools, etc). I don't see how at that time they could have been used for racist and classist purposes, so doubt that their origin was such.