Both of these are free and open source. There’s a paid hosting tier for NPM, but it’s easy to self-host that.
But your larger point stands. The more tools they can package together, the more they can push out competition. Why use Slack if it’s a pain to integrate with GitHub and Office, but Teams works smoothly? This is certainly not unique to Microsoft, look at Apple as a clear example. The App Store forbids competition with Safari’s rendering engine, and that limits the competition other browsers can provide. Apple has its own ecosystem around iMessage and iCloud that don’t work outside that ecosystem. So if we’re going to make rules that target Microsoft’s bundling of functionality, it should also target Apple as well.
I’m less concerned about price and more concerned about exposed capability. IMO, Teams shouldn’t have any different access to Office or GitHub as Slack has. Once you have a large market share, you need to be extra careful about how your apps communicate to ensure that other apps can directly compete.
And as you mentioned, I think defaults are part of the problem. Mobile Safari isn’t dominant on iOS because it’s better, it’s dominant because it’s the default. Same with Edge on Windows and Chrome on Android. If there’s competition for a given product, it shouldn’t be bundled with the OS, and if the product is important for most users, it should prompt the user for what to use. I can see exceptions here for basic functionality (e.g. a dialer on a phone, or file browser on a desktop OS), but that definition needs to be very restrictive.