Layoffs don't imply poor management.
During the pandemic the Fed slashed interest rates, giving companies more money so they can hire more people and keep unemployment down.
Then the Fed raised interest rates, forcing companies to lay people off to save money, so we can increase unemployment to fight inflation.
You could argue that Facebook's management could have predicted the Fed's rate hikes. Then they could have refused to hire people for new projects because they might have to cut those projects later. I don't think that's better.