I partially disagree. Yes, the benefit will not be fairly shared. However, the volunteers' works accelerate entreprises' works, which can then provide new services and new products faster.
Imagine some ML algorithms could find the cure to aging. You have two options : either wait that some company develops it, but you might be dead by then, or accerelate the process by open sourcing your code and hopefully get the companies closer to this goal. Now, that doesn't mean you will be able to access that cure if a company finally finds it and decides to sell it, but you increase the odds that something might be discovered.
It's like giving $1000 to charity, but with the scale of software, your coded contribution can have way more impact than $1000 on the world.