It’s a good question and it’s a shame you’ve been downvoted for raising it. The other answers don’t really get it to the heart of it. The question is why any company would deal with other companies rather than perform those same functions in-house. It has to do with the transaction costs of doing business with other firms and the efficiencies and inefficiencies of making your company larger and more complicated.
Ronald Coase wrote the paper that first got to the heart of this, one of the most important economics papers ever published: https://en.m.wikipedia.org/wiki/The_Nature_of_the_Firm