I have spent too many unfortunate years at a big Enterprisey software development organization, and have concluded that the real sociopaths/incompetents/climbers lie in middle management. I would even go as far to say that if the middle management has no technical responsibilities, and as such entirely is detached from the work of engineers, nearly 100% of them come from the aforementioned categories.
Let me try to elaborate:
Upper management is generally characterised by a good awareness of market needs/conditions, what needs/can be delivered by the next release, and the available and required resources needed to deliver features on time. They have both the power to make significant decisions, and are usually held accountable for delivering features.
Non-technical management usually draws its ranks from MBAs who think of engineers as pathetic nerds, engineering people who either don't want to code or suck at it, and culty types who try to apply every hip development methodology/pop psychology hack to hopefully improve the performance of engineers (which is usually accompanied by universal resentment).
They usually have the luxury of playing head games with the people under them (I'm fairly convinced most pop management MBA bullshit exists to make their work and decision processes totally opaque/give them control to do whatever they want as well as to gaslight their 'subjects' about their perceived performance).
Since this is getting long I'll cherry pick 2 examples:
I spent 3 days (+overtime) debugging an issue that involved a bug in native code that created memory corruption in the Java side of the app, which naturally produced weird behaviour - I got berated for taking too long, as well as not writing a detailed enough post-bug report of the root cause of the issue (why was this even a thing).
Another time, some MM came up a great idea of improving software quality (which was shit due to the huge amounts of legacy code we weren't allowed to touch) - which essentially boiled down to filling out an extra field in Jira, making a compilation of said fields in a PowerPoint presentation, and having a 3 hour meeting about said fields, and based on the results, probably defining some extra wishy-washy action items to follow in the future. Naturally, this added an extra responsibility to our understaffed, overworked team, which was created a naturally hostile vibe in us. However one of the least competent, and morally flexible guys (the guy who literally couldn't solve a single problem on his own, but had a talent for making his problems somebody elses too - and advertise the result as 'teamwork') naturally stepped up to drive the idea - and was promoted to some management position a few months later, partially due to these efforts.
In summary, I feel like unlike upper management, and engineers, middle management serves no purpose in most organizations, and they know that, so they create their niche by mostly less then ethical purposes, so they get to play petty despots with some, but not much tangible power, and little to no responsibility/accountability.