Microsoft contributes to the python foundation, Linux, and lots of other non-profits with valuable IP. I’m sure if any of those nonprofits stopped releasing source code and began giving it only to Microsoft, there would be a lawsuit as well.
OpenAI was still effectively sharing their research until last year.
As I recall OpenAI started becoming more closed at least around the time of GPT-3 (2020). Remember them initially saying the large model was too dangerous to release?
OpenAI was still effectively sharing their research until last year.