This is caused by managers' and middle-managers' performance metrics being tied to the wrong outcomes.
The top layer of management's target is the desired outcome. The bottom layer's (the worker) target is also clear, it's to do whatever their manager says to do.
In the middle is where it often breaks down; their objectives are short-sighted and while it works out for their own career, it rarely benefits the top level target. At best, it introduces a large inefficiency, waste of resources and unnecessary busywork ("bullshit jobs" becomes relevant here) and at worst it goes completely against the target set at the top level.
Imagine it as an eventually-consistent system. If you don't change anything and give the system enough time it will eventually achieve its goal. The problem is that the "time" we're talking about is measured in years if not decades and during that period the system is stuck in a contradictory state. Endless restructurings and other external factors often reset this "timer" so the system is even more likely to stay in the contradictory state forever (some other "systems" depend on this system staying in the contradictory state), despite theoretically advancing towards the end-goal.