When Windows 10 is installed, it continues to store your product key in the registry. This may be useful, if you don't remember which key you used on your current installation. Also if you lost your product key, this can be useful for recovering your product key with some third party tool or with a simple PowerShell script.
But at the same time, your Windows 10 product key is at risk of being stolen. If you are concerned about your product key being stolen (i.e. with some malicious software), you might want to remove it from the registry permanently. This operation is safe and will not affect your OS activation status. Follow this simple tutorial to learn how you can erase the stored product key in Windows 10. The same trick should work in Windows 8.1, Windows 7 and Windows Vista too.