"Do The Right Thing"
Anyone who has written or supported software in a commercial setting will have a good appreciation of the factors behind this decision... It could be a change in strategic direction; it could be a lack of client interest; it could be a bunch of other things... but even the biggest companies, like Microsoft, may want or need to retire a software product in this way, at least from time to time.
The problem is... the bigger the company that finds itself making that sort of decision, the greater the chance that there is an established user community for which the software in question provides a perfect solution to a business challenge they are trying to solve. As a result, the risk of reputational blowback for a decision like this could be particularly harsh.
But here's the thing.
In 2026, the Open Source Community has justifiably earned a reputation for writing and supporting world-class software. Which is to say that there are developers out there, right now, who would be able and willing to take on the Open Source support of Teams Live Chat if given the opportunity to do so. Heck, there might even be some Microsoft developers willing to dedicate some personal time to the project, as long as their contracts of employment permitted it... [On which basis, maybe not...].
We're long past time where companies making decisions like these should just effectively "throw away the code".
There needs to be some kind of "Corporate Pledge" structure in place for companies like Microsoft - all the big software houses - along the lines of a commitment that if the company decides to stop producing an in-Production software application [and please note, I am talking about ending all development and support for a product, not simply stopping support for an older version], then the company should pledge to releasing the codebase to the OpenSource community.
That way, if there are companies with a major dependency on the product, they might at least be able to obtain the source, hire some developers, and keep maintaining, extending and evolving the product.
In a perfect world it might even be possible to do this with basic hardware devices. Sticking with Microsoft since they're the subject of the OP, we could point to the Zune music player. When MS walked away from that, people lost their entire investments, because the Zune units were designed to brick themselves if they didn't reconnect to the Mothership every so often - so after MS shut off the Zune servers, that was "all she wrote".
So how about it, Microsoft?
Add a bit of "corporate responsibility" to your ledger and come up with a way to safely release end-of-life software to the community, for anyone who wants to maintain them.
As long as there is no super-secret logic in the codebase [which I guess might include licensed code belonging to other authors] then where's the harm?