I suspect Apple and IBM's software and hardware businesses have different margins. Another comment said that IBM still does some software work, but has basically exited 'low margin hardware' business.
Whereas Apple's software is nearly all free (and used to supplement hardware sales) while their hardware is extremely expensive for consumers and has huge margins.