Yes it's called capitalism, if they could get away with it they would pay us nothing. In good times the stock gets so high you can get away with super high salaries, over staffing and perks. But in worse times the stock starts to get a hit, the multiples don't look good and to retain earnings you have to cut costs.
The biggest cost is wages...