Programmers like to show off, and Linux development has become perhaps the premier means to do so. Coming up with more efficient ways to do things, supporting new modes of old hardware, exploring entirely new ways to use computers, and doing it well, enhances one's reputation in the eyes of other programmers. This is often far more rewarding than commercial enticements.
Because one of the goals of Linux development is often to enhance one's reputation, the developers are highly motivated to avoid bugs in their code. Nothing is more embarrassing than to have someone email you with a report of bugs in your software.
Eric Raymond has written several accessible and thought-provoking articles about the Linux development community. for more information, read The Cathedral And The Bazaar, and then perhaps Homesteading the Noosphere.
It's important to note the difference between a desire for fame and adulation, and a desire for the earned and considered respect of one's peers. Again, Eric Raymond has clarified this distinction very well.