Yes and no. A lot of the projects I work on the majority of the engineers are funded by companies which have very real commercial drivers to do so. However the fact the code itself is free (as in freedom) means that everyone benefits from the commons and as a result interesting contributions come up which aren’t on the commercial roadmap. Look at git, a source control system Linus built because he needed something to maintain Linux in and he didn’t like any of the alternatives. It solved his itch but is now the basis for a large industry of code forges with git at their heart.
While we have roadmaps for features we want they still don’t get merged until they are ready and acceptable to the upstream which makes for much more sustainable projects in the long run.
Interestingly while we have had academic contributions there are a lot more research projects that use the public code as a base but the work is never upstreamed because the focus is on getting the paper/thesis done. Code can work and prove the thing they investigating but still need significant effort to get it merged.
This bit I don’t get. Even on Lemmy and Mastodon we need moderation tools and arguably the current provisions aren’t fit for purpose. It’s not something that can just be pushed to the individual users and most hobbyists who want to spin up public servers don’t want to be spending their time wading through reports and CSAM. How to provide a safe environment for users is still an unsolved problem in the fediverse so it’s no wonder people drift to corporate controlled servers which say least nominally have the resources to do something about it.