Yes, it is true that developers writing the software for Google's search engine and Gmail and other products, particularly the early developers who were writing core functionality before it even existed yet, are creating value. But are/were they capturing the full value created? In general, no. To the extent they "captured value" only came in the form of salary/benefits/etc. So they captured some, to be sure.
In highly successful companies who create hugely successful products that create tons of value, the actual capture of that value is absolutely not shared equally. This is in part because the risk was not shared equally.
Just as in successful companies, unsuccessful companies that ship a product that does not do well or fails completely, the developers who created it still captured a salary along the way. The investors and others who put in money or time and energy for little or not pay (in exchange for equity) were the ones with the most risk.
Bottom line... everyone involved in company-building and product-building create value along the way but value capture is generally concentrated for very good reasons.
We all take risk. I could find myself working for a company that doesn't make it, or just decides to fire me at a moment's notice. Losing my job and not being able to find another one means I might not be able to feed and house my family. That's real risk. On the other hand, most investors are pretty well off, and can weather a few startups failing. They're likely not going to get to the point where they don't know if they can continue to house their family for the next few months.
Developer joining a startup risks almost as much as a founder. He leaves his existing job for a promise of a salary, and if this startup fails - is left without a job, and possibly, without a salary either. This happened to me, and I was paid for first 2 months out of 6 I worked there.
> The investors and others who put in money or time and energy for little or not pay
Investors still have most of their money, I am left without a job, unable to pay my mortgage and possibly buy food.
Imagine this: I put $X, you put $Y into an investment. If investment is successful, I get a 100$, you get $Y+$X-$100. If it is not, we both get nothing. Would you consider this investment fair? No sane person would put a money into an investment fund, expecting a fixed value in return, but employer-employee relations are exactly that.
It all comes down to which group the people signing the checks value. I often say "pay is a social construct" and this is what I mean -- there's no objective basis for any of it. I think devs are paid better in the Bay Area than elsewhere just because we're assumed to be more important here relative to other parts of the US/world.
There is no objective reality here, just a bunch of beliefs.