Hierarchy can work well, particularly for growing companies and making decisions.
It obviously has problems as a form of government, but the incentive structure of capitalism is a good one for work.
Even in democratic governments with elections you still have a decision hierarchy somewhere (hopefully just with some checks on their power)