There are, in reality, three ways that open source software comes to be. The first two are heavily subsidized (educational/academic proof of concept and internal projects by larger companies which are open sourced to cut maintenance costs). In the first case, academia subsidizes the software and in the second case the software exists open source to try to reduce the burdens on one company. Kafka, etc. are good examples of the second.
There is a third approach which I have also used which is the the customer-sponsored-development model. This works well with a certain kind of application aimed at vertical markets in business. Here you expect those who need new features or support accounts to subsidize maintenance. This is also how a lot of larger open source software projects that escape academia effectively work.
In all cases there are two distinct issues. The first is subsidizing the initial development. This has to be subsidized somehow because often times getting to a minimum viable project is a lot bigger than folks expect. Academia and big business are the two major ways these often happen here. But then the second is subsidizing continued development and maintenance. Here there are different approaches. One can use pay-for-development/support models or expect users to contribute patches (depending on the context of the open source project either one might actually be viable and beneficial and the difference is who is paying the paycheck, and what the relationship is between the user and developer).