Also why the airlines go bankrupt approximately once per career. The gross revenue per flight is the same as time increases, but pay raises for seniority decrease the profit as the workforce ages.
(Not making a value judgement here. Airline pilots have a tough job and do it well, and deserve to be well-paid. But the industry is not as nice as me.)
It's not like they're forced to pay their workers more as they age. The ones with unions may be forced to do so by their contract, but non-union airlines are hardly immune from bankruptcy. Airlines go bankrupt because it's a cut-throat business with extreme competition, which drives profits to zero.
An airline customer will switch carriers for as little as a $5 savings on the cost of a multi-hundred-dollar ticket. There is essentially zero customer loyalty. If you can't convince customers to pay more, and all possible cost-cutting measures have already been implemented, then you have no room.
In an ideal world, a business could survive forever in an environment like that. In the real world, business is variable, and with no margin, you can't build any resiliency. A couple of bad years is enough to screw you.
(Not making a value judgement here. Airline pilots have a tough job and do it well, and deserve to be well-paid. But the industry is not as nice as me.)