I don't think open source is really about making money for most companies, it's more about improving quality and keeping costs down. At a former employer we did follow the give-it-away-and-charge-for-a-service model, but we also worked on several of the open source libraries and frameworks we built our products on.
We shared all of this work with the upstream projects, as we had no interest whatsoever in maintaining private forks and because better quality infrastructure attracts more users, which again leads to further improvements or at least ensures the project stays maintained.
We shared all of this work with the upstream projects, as we had no interest whatsoever in maintaining private forks and because better quality infrastructure attracts more users, which again leads to further improvements or at least ensures the project stays maintained.