Citizens don't have to pay foreigner rates for public Universities. That's a nice $50k-$100k savings for higher-education that citizens get that universities don't get, right there.
What kind of breaks do immigrants get over citizens that are worth $50k-$100k? None.
edit: I am using immigrant-when perhaps one should use 'international student'
People aren't going to pay $50k-$100k in taxes in one year to cover this benefit that citizens receive.
But you're right that in practice it is taken advantage of with people renting an apartment for a year and doing the minimum necessarily to register as residents.
So overall you're still incorrect about it being a foreigner tax, implying perhaps they just hate non Americans and want to punish them.
Also same full tuition applies to non residents from other states.
So a foreigner living in a state could get in state tuition.
(and a citizen that only recently moved to a state might get out of state tuition)
https://www.suny.edu/smarttrack/residency/
Non-resident students, including undocumented students, who attend for at least two years and graduate from a New York high school may be eligible for resident tuition. See the campus Student Accounts Office (Bursar) for details and to apply for resident tuition.
https://admissions.tc.umn.edu/PDFs/ResidencyReciprocity.pdf
Nonimmigrants residing in this country or state under a temporary visa that bars them from establishing domicile in the U.S. (visas B, F, H [H4 visa holders who have graduated from a Minnesota high school should contact the Resident Classification Office on campus about their resident status.], J, O, and M) shall be classified as nonresidents. Nonimmigrants holding a valid temporary visa that does not bar them from establishing domicile in the U.S. (visas A, E, G, I or L) may be considered for residency, assuming they otherwise meet the Basic Definition of Resident Status.
An then many states seem to recognize refugee and asylum visas, which aren't the same as permanent residence (but that is more of a technicality compared to the above).