The two aren't mutually exclusive.
Sure, only selling things makes revenue directly. However, policies abridging freedom help both companies scale--by attempting to lock users into their platforms and making it difficult or impossible to not buy their software when getting a new computer, both companies get more people to spend more money.