This isn't true. Writing open source software is more profitable: it's cheaper (because everyone works on it) and works better (because everyone works on it).
The easiest way to make money in open source is to be a company that makes money from a product that depends on, but isn't, the open source product. Then other businesses will improve your infrastructure for free and make you more money.
That's why i don't think hardware opensource will work, but that this model "worked" in the software world is a miracle. By "worked", i mean that it exists.
It's not a free-rider problem if you were the one that released the open source infrastructure, or if you use it, need to change it, and send the patches back in. (That's why the GPL is a good license.)
it's incredibly difficult to make money in open source
This is true, but in the markets where open source thrives, it's even harder to make money in closed source. One talented programmer might make a new web framework, release it, and gain some fame and/or consulting hours. Good luck selling your closed source web framework, no matter how much VC backing you have.
Making money only writing open source is possible, but complicated and out of scope for this comment.
But writing some open source - making your tools (compilers, linters, runtimes), libraries, frameworks, monitoring, sysops/sysadmin tooling, and so on open source is much more profitable, and that's a huge subdomain of open source out there right now.
This doesn't really answer my question though. Seems like the other comment to my question is spot on. If you divide all company actions into making money or saving money then open sourcing your toolset is more of a saving money thing as you can get people who aren't on your payroll to contribute to them. That's all well and good but not exactly what I think of when someone says "making money with open source."
That seems like an accounting mindset. Engineering is not a cost center (to be minimized) it's an investment in the future. This view offers a lot more flexibility and options - including cooperation. It also suggests that you may get back more than you put in. Invest wisely of course.
For a lot of corporate open-source the goal is to commoditize a complement of your revenue-generating product and hence generate more sales. If you're Elastic, having more companies running ElasticSearch increases the number of paying customers looking for hosted ElasticSearch. If you're RedHat or IBM, having more companies using Linux increases the number of companies looking for Linux support. If you're Google, having more phones running Android increases the number of devices you can show ads on.
Similarly for independent developers. You don't make money off the open-source software itself. You make money by getting your name out there as a competent developer, and then creating a bidding war between multiple employers who want to lock up the finite supply of your labor. The delta in your compensation from having multiple competitive offers can be more than some people's entire salary.