This is comparing two pretty extreme scenarios… which are both pretty strange but for different reasons
A lot of performing arts (music, sports) and related industries have a “winner takes all” model, where the most famous performer makes exponentially more than the average one. OF is a bit similar. So if you are a top OF model who won the genetic lottery, you could make millions… which hides the fact that the average OF model doesn’t make remotely as much (as others have pointed out)
Open source is more like a normal business, but with the problem that it doesn’t really generate profits given that many FOSS software are free as in free beer… If there is no revenue then of course there wouldn’t be a good salary either…
I do think there is a rather similar but interesting counter example: academic scientists. Many scientists do make rather comfortable wages; where I live now, postdocs/professors actually get paid above the national average. However, this is because science is very important to society… so the money we make come from governments/taxpayers. Governments generally agree to fund science at the taxpayers’ expense, because it will pay off in the long run. If governments don’t fund science then most scientists (barring some engineers) would make peanuts as well… So yeah, if governments believe FOSS has societal benefits and fund FOSS developers, that might be a way for them to make a lot more