I think you are underestimating the developer's mentality. Sure most have to pay bills, but even then they have pet projects and passion for something else, like freedom tech.
Most new devs that have yet to make a name for themselves also have to pick a passion project to gain experience from. Retired devs strictly only have time to work on passion projects, feeling they have little time left on this earth to do something meaningful.
So while money incentivizes a lot of various kinds of projects, the ones that we should care about, such as those that can change the world for the better, often have plenty of developers trying to make a difference, no money required.
Nobody volunteers to make accounting software.