There is no “federal law” that mandates this.
Just one Supreme Court decision from 1983 - Plyler v. Doe.
And that was criticized then and now as a Constitutional joke.
The citizenry has every right to restrict access to taxpayer funded services to those who are part of the citizenry or invited guests - lawful permanent residents.
We are under no requirement to accommodate those who break in and demand our money just because they feel entitled.
And “residency” does not trump citizenship, as Obama, Rick Perry, and the entire chattering classes seem to think.
I don't think residency or citizenship played a part. It was property taxes, paid either directly or as part of the rent