You do realize that it costs money for Microsoft to produce Windows (mostly/entirely fixed costs), and if they crowd out OEMs, they will get less licensing fees from OEMs. But Windows still costs the same fixed cost to make. So it really balances itself out.
Little secret, circuit boards and chips are also mostly fixed costs. Which are represented in R&D and the capital costs of producing the fab. Once it is set up, the fabs companies like Samsung have can print out components by the truckload, and the raw materials are a small fraction compared to the finished price they are sold for by Samsung. But like the Microsoft example above, the more components a company like Samsung uses themselves, the more they can at high margins to other OEMs..