Apple sells hardware.
(And, increasingly, entertainment and services.)
Software is a positive complement to those revenue sources.