I come up with an idea. Maybe it's a great idea, maybe it's not. I have a few things that I can do with it. I can hide it away in an attempt to prevent anyone from ever finding it. Or I can put it out there for everyone to see. Or I can release pieces of it (via opening API's or releasing code) and see what others do with it. Or I can do all three and begin by keeping it proprietary, then open up pieces, and then make it entirely available.
Let's look at the choices:
If I keep it all to myself, I can sell or license it to others and potentially make some money. Good or bad, the quality of the code is based exclusively on the ability and knowledge of the team who developed it. Examples of this are easy to come by… Microsoft, Oracle, Macromedia, etc.
If I make portions availble via API's or releasing modules, I may be able to license the underlying portions and generate revenue while simultaneously convincing smart people to get involved to create things tangential to the core. This category has a few less examples… SugarCRM, Google, Amazon, etc.
If I make it available to everyone, I can't sell the code very easily, but I can sell my expertise and service. In addition, I might be able to convince other smart people to improve the quality and usefulness of the code in a variety of ways. Examples of this are also easy to come by… Apache Foundation, Redhat, Mozilla Group, etc.
If I cycle through the three stages, it might be the best of all. I can reap the initial benefit of having the licensing and revenue from the early phases, start getting people involved in progressively more and more advanced areas, and eventually allow others to play with the code as much as their heart desires. Very few companies are willing to release their products openly even years after they've derived the last of the value. The best example I have of this is the release of the Netscape and Quake source code.
This last category is by far the rarest model, but I believe it has the most potential.