@ solomon 3 + anon coward
Further to previous responses that explained how companies can make money out of OSS....
Reasons why people develop software:
1) It's their job to develop that piece of software, hence: Money
2) They don't get paid to develop software, but developing _this_ piece of software will make it easier for them to do whatever it is they get paid to do.
3) They want their computer to be able to do a particular, non-work-related thing, but either there is no software available, or they can't/won't pay for software already on the market.
4) Somebody mentioned an interesting problem to them, they've grown out of Meccano, jigsaw puzzles seem pointless and they don't have the time, funds or hangar to build an F15 from scratch.
5) They see a piece of OSS in an area in which they'd like to work (eg games, graphics, technical computing), but in which they have insufficient experience. They do it to familiarise themselves with the concepts/gotchas/techniques.
In the 1st case, there would obviously be no question of sharing the code and the Mill Owner might not be keen in the 2nd case.
For the others, though, what is to be gained by _not_ sharing? If the software becomes popular, the OSS developer gains kudos - kudos is a saleable quality - and you will probably know more about the software than anyone else (at least initially). If no-one but you ever uses it, you can view it as having gained development experience rather than rueing it as a failed get-rich-quick scheme.
PS Paris because she's living proof you can make millions by showing everyone your bits ;-)