If you came across a site selling 16GB DDR4 new, for $10, you'd run away laughing. Knowing it was a scam.
Licensed software is no different.
That is a terrible analogy. : P While Microsoft has costs involved with developing Windows, it costs them next to nothing to distribute a license for the software, so they price it according to what people are willing to pay in various parts of the world. Computer hardware, on the other hand, obviously costs money to manufacture, and unlike with software licenses, a manufacturer can't give away 16GB of RAM for $10 while still turning a profit, as it costs them more than that to manufacture and distribute.
Actually, quite a lot of them are illegitimate. Not just OEM bought in a cheap part of the world.
They are regular valid licenses, but obtained via illegitimate means.
Transfer stolen credit cards into real money, for example.
I'm sure there are some licenses that fall into that category, and the same could be said for some of the physical goods being sold on sites like ebay, but "quite a lot"? That sounds like a totally made up statistic. : P I would be interested in seeing a study into what portion of license keys come from various sources on key reseller sites, but I imagine only Microsoft has reasonably accurate data on that, at least as far as Windows is concerned.
You can install Win 10 and leave it Unactivated. Until such time as you want to buy a valid license key.
It runs just fine, with a few small caveats.
No customization of the desktop or taskbar, and a sometimes appearing watermark at bottom right.
Other than that, it runs just fine.
And that will be just as illegitimate as buying a gray-market key. According to the terms of service for Windows, one is only authorized to use the software if they have activated it with a genuine key. Microsoft may now allow people to get away with running Windows unactivated for an extended period, but they could also change their mind at any time. I suppose there is the advantage that one can be sure they didn't potentially pay money to a scammer, though clearly no money is making its way to the developer of the software either.
In any case, I haven't bought keys off reseller sites, though I could see why someone might want to get a Windows key that way, particularly for a system built on a lower budget. As for things like game keys, it's probably better to just wait some time for them to go on sale for a fraction of the cost if the price is deemed too high at launch. And for something like Office, if one actually needs an Office key, then they will probably be using it for business purposes, otherwise they might as well use an open-source office suite like LibreOffice.