If you are building, then it better be your core competence. If you buy, then as you become larger and more successful, buying will be more and more expensive. Its hard to make your suppliers exclusive, and competition will be somewhat maintained.
The Linux Kernel is a great example. There used to be a ton of kernels to choose from maintained and developed by small businesses, but over time Linux was chosen as a good free option. Companies would then put relatively minor investments into customizing or maintaining Linux, avoiding needing a proprietary kernel. After 20 or so years of this, there is almost no money to be made as a small operating systems vendor.