If selling phones is profitable, then the best scenario is to sell as many phones as possible, regardless of Microsoft's money. Once they sell more than enough phones to offset Microsoft's money, it means their profit per phone goes up, so "selling just enough phones to cover the production costs" doesn't really make sense.