Typically, when companies are having trouble generating top line growth they cut costs. And, unfortunately, since people are often the highest component of costs, they are among the first to be cut.
Also, it makes sense that the amount of people being laid off is at an all time high, there are more people working now then ever before.
And to further complicate things, neither jobs performance nor broader economic performance (i.e. GDP growth) correlate really well with the stock market. So beware trying to market-time on macro indicators alone -- sometimes bad times for workers can be good times for corporate profits and hence shareholders.