Naïve per-student-spending calculations can misleading. Some students cost a lot more than others. My state spends hundreds of thousands per student in some cases—but that's schools in juvenile detention facilities. Nonetheless, that goes in the stats. Kids in self-contained classrooms ("special ed" kids who can't function in the normal classroom) can be several times as expensive to educate as the median kid. Kids in ordinary classrooms who get a dedicated assistant, they've got all the usual spending plus the fully-loaded cost of the assistant, so that's easily over $50k total. Kid in a gifted program? Add low-five figures to the cost. Fancy selective-admission public schools, which some states have? Typically higher spending per student than other schools, which drags up the average.
They also have bussing costs, which (e.g.) private schools don't, which further complicates comparisons. That's not a small amount of money.