It's not just some components, until Apple developed their own chips, they manufactured the SoC powering the iPhone. Even to this day, Apple rely heavily on Samsung for their screens. Megacorps work with competitors because if they don't a competitor will. If Samsung decided to just not supply Apple with screens, Apple would just go to LG or BOE and all of a sudden, Samsung is out the lucrative iPhone supply market. If Microsoft didn't develop Office for Mac, another company like Google or Apple themselves will come in.