If there is no evidence that teachers with 20 years experience are better than those with 5, the two sets of teachers should be paid about the same. Current salary structures negotiated by unions heavily reward seniority.
From a cost/benefit perspective, an employer also factors in churn rate, cost/time for interviewing new employees, absorbing the initial skill ramp up within an organization along with training and time impact on other employees (aka resources when one has this sort of discussion.) There was some number like 40% of teachers leave within the first five years and that number goes down over time.
So the slow pay ramp from five to twenty could be some sorta amortization of the hiring costs and initial risks.
Someone with a financial or actuarial background could probably make a better explanation than I.