This sort of thing is not specific to Microsoft's gaming business. Microsoft's habit of using Windows OEM licensing as a tool to prevent computer manufacturers from shipping other operating systems (especially in the 1990s) is well-documented, for instance.
In your example, the Visual Studio licenses are in-house to the development company. There is a different set of license agreements in place regarding the technology shipped out on game discs. Microsoft is well aware there's more money to be made there than from VS licenses, so they're more flexible on toolchain/development contracts than they are on middleware and production library contracts.
I also believe MS had been sued for the OEM racket in 90s and lost so, while it might be true, it's almost 20 years later now and also, I am not sure it's a licensing contract. Looks more like a re-seller/dealer relationship.
Can you give a few examples of these agreements? From what I know, everybody who develops for PlayStation licenses MS Visual Studio yet there had been quite a few PS exclusive games over the years. Is this the only exception? Genuinely curious.