Same coin. The moment the picture starts looking rosy, companies go overboard hiring, thinking about milking the situation. The moment the situation gets murky, companies try reversing all their decisions. Result: layoffs.
Apparently the problem might seem embedded in the market dynamics. I feel the problem stems out of the greed of the top management in every corporation. Why can't the top management, and even the tier below, cut their multi-million dollar salaries (how much does one need to live a comfortable life) and share with the ones whom they plan to lay off? There could be other alternatives too. Infosys didn't cut jobs; it asked some of its employees to voluntarily serve for a social cause for a year and in turn receive half the salary. Now that's caring. That's innovative. That's being responsible.