lepke1979: Usually happens when game is bought fraudulently.
carnival73: You can't buy a *key* 'Fraudulently'
And I highly doubt you can key gen serials for GOG or Steam games
You absolutely can buy a key fraudulently, if the key seller got it fraudulently. As mentioned, there have been multiple instances of keysellers buying GOG keys using stolen credit cards, then reselling those keys to unsuspecting customers. There were also instances of promotional codes, like the Witcher codes that shipped with certain Nvidia hardware, being removed from their promo items and sold. Lastly there is the fact that GOG's terms state that giftable keys from GOG cannot be resold, so even if they weren't obtained fraudulently, they are still illegitimate keys. It sucks, but assuming the keyseller you got it from did one of those things, you got screwed.
Having said all that, there have been instances of a library glitch, where random games disappear for no apparent reason. Usually refreshing you account can fix that, but if it doesn't, you'll have to get GOG support to fix it.