All laying people off means is that there are items that the company will not be executing against in the future. It may or may not mean that they're in a bad spot, but very often - and the case with many of the current tech giants laying off that we're seeing - it simply means they grew more than they needed for the road ahead.
Whether or not that's good or bad is a fair question. It was asked on a previous thread whether we as a society should be comfortable with companies gabling with the jobs of their employees, and I think that's a worthwhile question. But it most certainly does not mean that a company is "doing terrible."