My favorite other example of this is when I see a UI redesign that didn't actually benefit anyone and was more a style change than anything, and sometimes actively makes usability worse (cough Liquid Glass cough) In those situations I always think "well, some designers on staff needed to justify their paychecks".
https://www.investopedia.com/terms/p/principal-agent-problem...
E.g. you often imagine cases like a manager making a decision that causes a short term pop in stock price (and bonuses to the manager) to the detriment of the long term health of the company when thinking about the principal agent problem. In the cases I'm thinking about, though, it's more that people rarely can do nothing, even if that's sometimes the best thing to do. E.g. large companies need to have lawyers and designers on staff for lots of reasons. But sometimes there just isn't enough work for these folks to do (even if they need to be "warm" and ready when important work comes along). And if there isn't enough work to do, these people will find work to do.
This is another reason why I think that, even though layoffs are painful, having people "milling about" without clear direction and purpose is the worst for everyone involved. These people will just schedule meetings, insert themselves where it isn't helpful, etc., just to make it seem like they have a purpose.
This could be thought of as a "variant" of the principal agent problem I guess, but this instance of "idle hands are the devil's playthings" is different enough from the "standard" principal agent problem that I don't think it's helpful to conflate these two things.
It is possible to find work in a different area at the company for such in-between times.
For example at the company where I work, a (very capable) secretary whose original role was not needed anymore, but for who there existed a very role in the future was for the in-between time assigned to assist some other department in their reporting duties to regulating authorities.
I think this is especially true at big corps with little actually meaningful work and where most people who actually care about doing meaningful work has left a long time ago.
Because it provides zero value and costs something to keep.