Microsoft's strategy is to build a moat around VS Code/GitHub. Compared to GitLab, they have:
* Brand recognition of VS Code
* VS Code extension gallery that only VS Code can connect to
* Buttons in the Desktop version of VS Code to connect to GitHub Codespaces, Azure etc
* MS-written closed source extensions- Pylance, parts of OmniSharp, Remote SSH, Remote Containers, Remote WSL, Live Share, GitHub Copilot, IntelliCode, Python WASM In the Browser, GitHub Codespaces integration.
* Control over the VS Code API. They can add just the functionality their extensions need and nothing more.
* They own the LSP specs. They can add just the functionality that VS Code implements and nothing more.
* Control over the VS Code "proposed" API. If you want to use these APIs in your extension, you have to be whitelisted by Microsoft (or ask users to install a non-VS Code version of VS Code). Gitlab can offer a Web IDE, they can't offer integration with desktop VS Code to provide those nice features like desktop-level keyboard shortcuts, Git Clone, compare with working tree, etc as that would use the "proposed" APIs.