I really get the feeling that many companies are just blindly doing whatever other companies do. One starts large layoffs, and suddenly everybody is doing it. At other times, when one goes on a hiring spree, they all go. One tries to reduce salaries, they all do. One pays enormous bonuses, and they all do. It's like CEOs aren't really thinking for themselves, just copying whatever the market does.
Layoffs suck-they hurt everyone involved (except maybe for the shareholders?) and are a big big deal for each individual that it affects.
That being said, it doesn't take a genius to see that they are very useful from a company perspective. Given how difficult it is to fire underperformers, layoffs allow them to cut a huge swathe of underperformers (and, realistically, people they don't like) without opening themselves up to endless litigation. Yes, the justification can be as simple as "the economy looks like there is an economic downturn and see? the other companies in our industry are doing it too."
Smart companies treat it as a tool and use it sparingly, dumb companies over use it and kneecap themselves for the future.