I get it, you've been at some bad startups and choose to generalize that experience. I can assure you I've worked in some large successful companies with building after building full of the dumbest people you've ever met.
This situation is common in acquisition/acquihire scenarios. The critical people end up leaving because they have the skills to move on or the new leadership above them becomes grating, and many other people end up being left behind. This leaves a piece of software/sub-organization that's making money but can't take it much further than where it was left when these people moved on. It is possible to not end up in this kind of situation but in my experience this was the most common reason why there was a whole floor of people without skills or leadership somehow staying on as a zombie.