Unfortunately even with great companies where the "floor" of technical ability/intelligence/whatever is of course higher than the general population; there exists the same percentage ratio of competent people to non-competent people. A somewhat non-competent manager is actually fine in my experience, if they trust their team to know more about technical topics and try to stay pleasant.
This case obviously wasn't one and I'm sad to hear it. However, as a young and aspiring start-up founder, these stories are a great help and inspiration on how to structure my own company to avoid, or rather, minimise such clashes. Thanks for sharing!