Many web companies provide APIs which allow third parties to use and build upon their services. This allows the company to focus resources, creativity, and attention on the main thrust of their business, while benefiting from the resources, creativity and attention of the companies which use their APIs. I would say that these days, providing an API is best practice.
A good example of this is Twitter, a fascinating company. Since its earliest days, Twitter allowed third parties to access and modify user data through its APIs. As a result, a thousand Twitter clients have bloomed, providing users with a rich user experience and various tools while Twitter concentrated on the critical problem of scaling its service to meet its incredibly rapid growth.
A good example in a different domain is Wholefoods. When I walk around Wholefoods, I often pass tables offering samples of different products. Some of these tables may be run by Wholefoods, but I believe that many are run by third-party vendors. Wholefoods provides the infrastructure (building, heating, payment) which the vendors use. This is essential for the vendors, and works well for Wholefoods, because the vendors use their own creativity and business dynamics to provide something which Wholefoods in theory could provide, but which it does not have the time or interest in providing.