Private employers have profit/loss constraints that govern what they can pay in terms of salaries and benefits. The government does not. It can always raise or print more money. In the private sector, you have unions on the one side, and those picking up the tab (the employer) on the other. If the employer pays too much, it will go out of business in a competitive marketplace. When it comes to the public sector, there is nobody at the bargaining table representing those who pick up the tab: the taxpayer.
That's why public sector salaries and benefits go up at a time when private sector salaries and benefits go down.