They don't, they just get a lot larger budgets thanks to wealthy parents. In some states, they also get state funding on top of that.
I'm not sure if it's still the case now, but there was a time when public funding for schools in Arizona would transfer to a charter school with a student, but if a student left, the funding would not transfer back to the public school system. So the money flowed one way and simply acted to drain funding from public schools.