Software isn't where Apple makes their money. It never was. They NEED software to make their hardware do anything but that's all they ever should have considered. The many years of rivalry with other OS makers was stupid and costly. They weren't really in competition.
You get a free copy of OSX with every Apple computer but charging for OSX upgrades only makes the job of keeping all that hardware running smoothly more difficult. It generates avoidable support calls and support is a huge cost.
If the software (they have to write anyway) is free and hundreds (or thousands) of bug fixes are always just a free download away then everyone benefits. Apple can stop focusing on feature parity with other operating systems and focus on what makes their devices better for their users.