Microsoft does not give their license away for free. OEMs pay for every PC they ship. The OEM licensing price is lower than the retail price but the PC buyer most assuredly paid for their copy of Windows. Microsoft just decided they needed to double dip. They make money on the front with licenses and subscriptions and on the back with advertising.
This was in response to another comment up the thread saying that the license is basically free since you can use it without activation with very few limitations (can't change the desktop background and such).
If that's a problem it's one created by Microsoft themselves. They're the one that sets their license fees. Their execs set stock guidance.