Mediocre or bad managers make a lot of less than ideal decisions, and those decisions ripple through the entire system. There is no test framework or CI/CD system to catch manager mistakes, and few companies have a rigorous measurement/feedback system.
The best (tech) managers are the somewhat rare group who not only have a good grasp of technical issues (and ideally have solid experience as developers), but they also have good interpersonal skills and empathy. In my experience, the good soft skills managers rarely also have comparable tech skills. And the reverse group make horrible managers and tend to burn out very quickly.
Measuring performance of managers is much more difficult than measuring performance of developers. As such, poor managers can exist indefinitely at some companies, ironically because their own managers may not be good at measuring and identifying bad decisions. This often goes all the way to the top.
Finally, CEOs are terrible examples. More than any other title, CEO is an echelon which once reached, by whatever means, seems to ensure that the title holder can almost do no wrong.