I really recommend you read The Cathedral and the Bazaar
(by Eric Steven Raymond). It's a cult classic which tries to explain the Linux phenomena you have enquired about.
Here's the link:
Here's an extract from page one:
Linux overturned much of what I thought I knew. I had been preaching the Unix gospel of small tools, rapid prototyping and evolutionary programming for years. But I also believed there was a certain critical complexity above which a more centralized, a priori approach was required. I believed that the most important software (operating systems and really large tools like the Emacs programming editor) needed to be built like cathedrals, carefully crafted by individual wizards or small bands of mages working in splendid isolation, with no beta to be released before its time.
Linus Torvalds's style of developmentŚrelease early and often, delegate everything you can, be open to the point of promiscuityŚcame as a surprise. No quiet, reverent cathedral-building hereŚrather, the Linux community seemed to resemble a great babbling bazaar of differing agendas and approaches (aptly symbolized by the Linux archive sites, who'd take submissions from anyone) out of which a coherent and stable system could seemingly emerge only by a succession of miracles.
The fact that this bazaar style seemed to work, and work well, came as a distinct shock. As I learned my way around, I worked hard not just at individual projects, but also at trying to understand why the Linux world not only didn't fly apart in confusion but seemed to go from strength to strength at a speed barely imaginable to cathedral-builders.
Also, remember that the Linux philosophy is based upon the UNIX philosophy, but with a focus on FREEDOM:
The definition of Free Software: