Please point to any company that does anything out of the goodness of its heart. Companies don't have hearts, they have employees and shareholders that need to be kept happy and paid.
Never claimed any other company did that, what I am suggesting is your post reads like a PR fluff piece, and gives more or less the same rhetoric Microsoft gives as well.
Honestly, most of the FAANG companies are guilty, but I will give Facebook kudos for being fairly honest about the mutual benefits that came from open sourcing React.