Open source is much more than free software, it is better thought of as crowd-sourced software. This is a bottom approach to development in which the best solutions are retained and the rest are discarded.
It works well for the same reason that other bottom-up approaches like democracy and capitalism work well. To much top-down control almost always leads to poor decisions as those at the top fall in love with their own ideas and their egos force them onto others lower down in the chain of command.