This is Baulmol's Cost Disease (https://en.wikipedia.org/wiki/Baumol_effect) in action, and it's something that advanced economies must take into account.
A barber today is not much more productive than a barber in 1900, but a haircut today costs much more than a haircut in 1900, even adjusted for goods inflation. Why is today's haircut evidently more expensive?
The answer lies in the labour supply. If haircuts didn't cost more today than in 1900, would-be barbers would work in goods-producing sectors that have seen real productivity growth and consequently 'naturally' improved wages.
In some sectors, this has led to the replacement of labour with capital. Domestic help was once hired by the ordinary middle class, but now we have kitchen and household appliances instead. We see fewer expensive hand-crafts and more factory-produced goods. Even fast food joints try to replace human service with ordering kiosks.
This replacement is much more difficult in the government sector, where transfer payments tend to relate to income rather than absolute provision of hard goods and where health-care and education are two of the sectors most affected by the Baulmol effect.