AOSP used to be the complete Android system, more or less. And when you bought a Nexus device from Google, that's what you got. But they progressively abandoned the stock apps to replace them by their proprietary counterparts, or ones tied to their online services.
Then, they replaced their Nexus line of phones with the Pixel line. Pixels are full of proprietary technology, and their last move was to make Android development private.
The issue with VS Code is that it opened the door to many other editors, which, in a sense, drive people away from the Microsoft ecosystem. The combination of VSCode, GitHub, and TypeScript is ideal for MS: they win by attracting companies to GitHub services (which also offer code spaces based on VSCode); they also win by attracting users to Copilot, which helps them improve their tools. Creating an editor like VS Code is expensive; they are not paying the core developers because they prefer to give away money. They do it because it's part of their business strategy. You don't pay for VS Code; companies that subscribe to GitHub services do. A VS Code fork circumvents that strategy.