"As a result, company B gets the same results 2 times cheaper" - that's just an assumption. If I turn it around, it sounds - "people on average in high COL area do the same work two times faster than in low COL area".
If you're paid $300k/year it's probably some kinda fancy faang job. How productive you are in that environment doesn't necessarily translate into productivity in others. And vice versa.
Beyond that, highest paid people I know aren't paid well because they're 5x as productive, they're paid well because they solve really hard problems - the types of problems you don't run into at most companies.
To use an analogy: neurosurgeons aren't expensive because they're really good at "doctoring". Even if you had all the $$$ in the world you wouldn't consult one for a sprained ankle.
The assumption they're claiming lunarhustler made is that engineers in Silicon Valley and engineers in (say) Utica, NY work at approximately the same speed and quality.
The assumption dorwi's asking you to make is that moving to Silicon Valley somehow makes you work twice as fast, or that only engineers who work twice as fast live there.
Basically, lunarhustler is making the assumption that humans who can program end up at roughly the same quality no matter where they live or how much you pay them, while dorwi is making the assumption that how much you are paid is directly related to your productive output.
There are reasons to want to live in a high COL area that attract people to live there regardless of job prospects alone. If you want to hire young smart people who're into culture and nightlife and not having to drive everywhere, the best will be in expensive cities.
There are places in e.g. Europe where a young smart person can live like a king on their American tech salary, while still putting off most of it into savings... I assure you the culture and nightlife aren't bad there either.
Beyond that, highest paid people I know aren't paid well because they're 5x as productive, they're paid well because they solve really hard problems - the types of problems you don't run into at most companies.
To use an analogy: neurosurgeons aren't expensive because they're really good at "doctoring". Even if you had all the $$$ in the world you wouldn't consult one for a sprained ankle.