While the manner of layoff, role of layoff and person to lay off all seem foolish, profits do not mean that layoffs are a bad idea. You should hire people you need and if you want to good in the world, donate to the most effective charities (in QALYs/£).