When Windows 10 detects a new threat on your device, it will automatically send the problematic file to Microsoft. This enables the company to analyse the threat and develop new antivirus definitions that help identify it in the future.
While this sample sharing helps improve the overall security of the Windows ecosystem, it might make you feel uncomfortable. Although Windows will prompt you if a sample is "likely" to contain personal information, you may prefer to disable sample submission altogether.
The relevant option can be found in the Windows Security app (previously known as Windows Defender Security Centre prior to the Windows 10 October 2018 update). Launch the app and press the "Virus & threat protection" tile on the homepage.
Next, click the "Manage settings" link under the "Virus & threat protection settings" heading. This screen controls how Windows detects and responds to possible viruses on your PC.
The relevant option for our purposes is under the "Automatic sample submission" button. If it's enabled, simply click it to turn off the automatic sample submission. Potentially problematic files will no longer be sent to Microsoft when they're detected or quarantined on your device.
Microsoft warns that disabling sample submission could impact the effectiveness of Windows Defender's cloud-delivered protection. Consequently, it's possible you'll miss out on the very latest antivirus definitions being offered by Microsoft's cloud servers. You should think twice before turning off this option – it's a delicate balancing act between protecting your personal privacy and keeping your device secure.