If the company makes money, there is very little reason to fire the CEO. In fact pretty much the opposite, there are probably CEOs that would deserve to be fired for multiple reasons, but because the company makes good money, the board won't care. The board is responsible towards the owners, if they actually fire a CEO of a performant company, they really have to show why it was in the best interest of the owner.
All these stories where the CEOs were fired are from companies that weren't profitable, needed constant funding rounds etc. In the situation where the company is just sucking money from investors the CEO gets changed easily.
The idea that "if the company makes money" is taken as a universal here is false. In the real world it is entirely contentious, and the source these sorts of conflicts. The fact is no one knows for sure the future prospects of a company, but people with power can surely ram through their ideas even in the face of economic pain.
Wrangling that sort of power maneuver is the responsibility of the founder; that is if they wish to retain their control.
All these stories where the CEOs were fired are from companies that weren't profitable, needed constant funding rounds etc. In the situation where the company is just sucking money from investors the CEO gets changed easily.