They occasionally undercut their competitors. The first flash iPods were cheaper than any other consumer device (including USB flash drives) with that much flash because Apple anticipated the demand and bought up an entire year's flash production capacity from several suppliers, getting a reasonable discount. No one else could get flash chips at close to the rate that Apple was paying for a while. More recently, they've used their cash reserves to build factories for suppliers in exchange for the first year of output from them. They end up paying less for chips than anyone else, and the suppliers then get to keep operating the factory and selling the output after Apple has moved on to wanting the newer process.