Because most for-profit closed-source software is made by companies. It's in their best interest to use Open Source libraries in their software - it's free work and they don't have to give anything back.
I've heard this again and again, and yet every time I see open source used by a company, there are patches being applied, compliance concerns and audits, and integration efforts.
Sometimes this effort costs less than writing the code yourself (such as integrating with a database), but not always.