Sorry if it looks misleading but it's actually OR and not AND. It's 3 types that have no incentive to work, either by internal state or because they are hired not based on merit but because other non-performance based reasons.
It'll require a complex answer.
First - typical managers don't like to cut jobs as amount of reporting people define power of manager, and if you bloated it's easier to keep useless people than to cut them. This pose a problem because this lead to a situation when most team are bloated and that's bad. To solve this and not disturb balance of power all teams should be cut at once. It's also make it easier for teams as it seems fair and equal and no one point fingers to underperformers.
Of course some teams are more lean and some more fat so higher management can shift quota from least performing to most performing, but it's done behind the scene to not disturb general perception that everyone hit evenly. And I have yet to see top performing teams to be significantly affected by cut, even due full scale restructure when 50+% of workforce are laid off, there are usually schemes and private agreements that "those guys are untouchable".
Second - yes, you are right, companies do it to increase profits, as a good companies should do, commercial companies are for-profit organizations.
Usual healthy business cycle consists of two phases - growth when company actively hires, actively trying to get market share, invest into new opportunities etc. It doesn't really care about efficiency at this point and internal structure and business processes become weak (especially in new/growth areas), profit margin plummets. The more growth is, the more burden weak structure, processes and internal inefficiency becomes, limiting further growth. And as growth slowdown, shareholders ask company to fix it, because it neither grow nor bringing money. And companies go to second stage of optimization, they cut expansion plans and start working on internal structure, making it more robust, optimizing business processes, eliminating inefficiencies etc. It's when people are cut and it's improve profits considerably. And after company optimized itself to be able bear greater weight, it start expanding again.
And big companies can have different parts in different stages as they are many business bundled together.