I think most job salaries can be linked directly to how much of a difference the employee can make. A complete dud at McDonalds in the kitchen might cost a few thousand on average but the further you go up, the greater the damage or benefit potential gets.
David Graeber, of Bullshit Jobs fame, makes the distinction between service work and caring work. Doing things vs taking care of other humans.
Part of his thesis is that society undervalues the labor of caring workers, because they get so much "job satisfaction". Teachers and nurses are examples of caring work.
I lean towards Graeber's thesis, mostly because I haven't read any other explanation for this pathology, so Graeber wins by default.
> parents paying for private schools seem to be willing to pay that for their children
Exactly—people aren't willing to pay for someone else's education, but everyone needs an education, so teachers who care enough that they are willing to teach for minuscule pay wind up squeezed between societal apathy and societal need.