Companies like Red Hat are doing it in very good way... They leave lot for the community that develops these software.
But Microsoft is obviously a cancer (It did not give anything really to FOSS ecosystem, just took from that), and Google is a double edged sword.
Google uses open source components which is highly advantageous for technical end users (Eg: I can run Linux utilities even on a non rooted Android). But their vendor lock in is second to none but Apple & MS.