A very complex project like Apache or the Linux kernel brings the satisfaction of the ultimate in intellectual exercise. Much like the rush a runner feels while running a race, a true programmer will feel this same rush after writing a perfect routine or tight piece of code. It is difficult to describe the joy felt after completing or debugging a hideously tricky piece of recursive code that has been a source of trouble for days. The point is that many programmers code because it is what they love to do, and in fact it is how they define their intellect. Without coding, a programmer feels less of a person, much like an athlete deprived of an opportunity to compete.
Many programmers consider themselves, rightly, to be scientists.
Scientists aren't supposed to hoard profits from their inventions, they are supposed to publish and share their inventions for all to benefit from. A scientist isn't supposed to let profits come at the expense of the pursuit of knowledge. What all these introspections on programming have in common is an emphasis on reputation. That value is enhanced when the work is more widely shared, and that value is enhanced when the work is more completely shared by showing the source, not just the results from a pre-compiled binary. Empowerment, in many ways, is the most important concept underlying Stallman's motivation for starting the GNU project.