There is a huge cost. Maintainers have major time commitments, and we hear jobs looking for people's OSS contributions. Which is cool and all until you realize that some people work at Facebook on React and get to publish to OSS as their day job, and some people like myself have kids and a proprietary software job.
So I fully support companies offering their software free, except to run commercially.
To note, about 8 years ago I saw many companies and people open sourcing interesting software. This was for personal gains... They were a consulting company. ThoughtBot was a good example, they made tools, they made blogs about ruby on rails, they also sold their professional services. And it worked.