These companies are raking record profit because they've managed to place themselves as de facto monopolies in their respective areas. The software world is a winner-take-all in nature, where the last man standing becomes a super profitable monopoly (SV prefers the term "the moat" instead of monopoly). It has little to do with the workers of these companies and everything with the lack of regulation of the tech sector.
But that means the work being done at those companies is more valuable than the work being done elsewhere, and so it makes sense that those companies would pay more (because marginally better employees will add even more value than they cost, due to the org's over-size leverage of that work). That in turn raises salaries for all workers in the same market.
That very well may be true, but I would rather the workers still get paid concomitant to the profits the corporation is raking in rather than even more wealth being accumulated by the capital class running these corporations.