super location dependent. There are many reasons, from the absurd to the cruel (CA for example doesn't allow property taxes/council rates to track market value, largely because of campaigning in the 70s after the Supreme Court said CA had to fund schools in poor neighborhoods to the same extent as those in rich neighborhoods).
I'm from NZ, so my US partner's Oakland, CA high school experience was horrifying:
* They had metal detectors on entrances
* They had armed police (or something similar: a precursor to the modern US "school resource officers")
* They had drug dogs, one of which OD'd
* The toilet stalls did not have doors
On the other hand, if you drove 15 minutes up the road into Berkeley, their public high schools have their own swimming pools.