It goes back to the iPod days.
Apple used to buy up the flash memory in advance. Leaving competitors to pay more for smaller yield or inferior quality.
It doesn't always work. Apple once invested a huge amount in making sapphire glass for their watches. I can't remember the company name but they failed completely at delivering to Apples required spec and the deal was scrapped (leaving the supplier to face massive debts).