This is explicitly addressed in the Visual Studio Code FAQ:
Why does Visual Studio Code have a different license than the vscode GitHub repository? To learn why Visual Studio Code, the product, has a different license than vscode, the open source GitHub repository, see issue #60 for a detailed explanation.
In that issue, a vscode developer explains:
When we set out to open source our code base, we looked for common practices to emulate for our scenario. We wanted to deliver a Microsoft branded product, built on top of an open source code base that the community could explore and contribute to.
We observed a number of branded products being released under a custom product license, while making the underlying source code available to the community under an open source license. For example, Chrome is built on Chromium, the Oracle JDK is built from OpenJDK [...] Those branded products come with their own custom license terms, but are built on top of a code base that’s been open sourced.
We then follow a similar model for Visual Studio Code. We build on top of the vscode code base we just open sourced and we release it under a standard, pre-release Microsoft license.
[...]
Here's how it works. When you build from the vscode repository, you can configure the resulting tool by customizing the product.json file. This file controls things like the Gallery endpoints, “Send-a-Smile” endpoints, telemetry endpoints, logos, names, and more.
When we build Visual Studio Code, we do exactly this. We clone the vscode repository, we lay down a customized product.json that has Microsoft specific functionality (telemetry, gallery, logo, etc.), and then produce a build that we release under our license.
When you clone and build from the vscode repo, none of these endpoints are configured in the default product.json. Therefore, you generate a "clean" build, without the Microsoft customizations, which is by default licensed under the MIT license [...]
The built version released under Microsoft's EULA, then, is a specific configuration of the open source code base.
When Microsoft says,
"Visual Studio Code is open source."
what they appear to mean is,
"Our offering of Visual Studio Code is built using an publicly-available code base that is licensed under an open source license. With the exception of branding and configuration values, this open source base is identical to the built software product we offer."
The only changes they make when building the binary (according to their claims above, anyway) is to utilize existing configuration options to add Microsoft branding and have network-based components within the editor use Microsoft network endpoints.