I have a pet theory about this, interested in hearing people's thoughts. Warning: long rambling post to follow.

But to preface - the tech industry in the US is highly bimodal. You have high-paying "elite" dev jobs largely centered around major tech hubs, at VC-funded startups and BigCo tech companies... compared with dramatically less well-paid tech jobs elsewhere in the country or in less prestigious firms.

For the sake of the argument we're really talking about the former case - I think if you look at the numbers for the latter group, the salary difference between US and Canada is dramatically reduced.

Elite tech compensation in the US is largely driven by big, highly profitable companies: Google, Facebook, Apple, Microsoft, etc, all come to mind. These companies compete aggressively with startups and each other for talent, and compensation at these companies have risen dramatically over the past 10-15 years.

These companies have intensely fat margins, and are immensely profitable, giving them more latitude to pay more. These are the kinds of companies that can give everyone a blanket 10% raise without breaking the bank (see: Google, a few years back).

Startup compensation have also increased dramatically in the same time period - but IMO that's largely due to pressure from BigCo comp packages. They are competing largely for the same talent pool, after all. Despite their relative lack of profitability, startups are able to compete in the market due to the availability of VC funding.

Given that, let's translate to Canada, where we can make a few quick observations:

- There are no Canadian-born equivalents of Google, Facebook, Apple, Microsoft, etc. There is a lack of institutional tech companies that are highly profitable. This eliminates a huge source of upwards wage pressure. Blackberry looked like it would become such an institutional employer for a time, but obviously that's no longer the case.

- There is comparatively very little VC funding. There is less total money, but also funding rounds tend to be dramatically smaller. Investor risk aversion also appears to be dramatically higher in Canada than the US. Even if there were institutional tech companies driving up wages, it's unclear that Canadian startups have the money to compete.

- The general availability of US work visas for Canadian nationals means that Canadian engineers largely can join the US labor market without too much trouble. This has caused US companies to hire vast amounts of Canadian talent to work in the US, effectively causing them to join the US labor pool.

The net result is that the Canadian tech scene looks something like this:

- There are a number of satellite operations of major foreign companies (see: Google, Amazon, Microsoft), but because of lack of local institutional tech employers driving wage competition, compensation remains low. Portability of Canadians into the US also means that anyone who dislikes this setup can just move to the US (and they do, in huge numbers). The satellite operations are intentionally there for the cheaper labor. For the companies it makes sense: they capture all the Canadian labor that is willing to move south, and they capture all the Canadian labor that wants to stay put (at a cut-rate price).

- There are Canadian companies, but largely they do not enjoy the vast profitability of the major American tech cos, and so have little means to really engage in competition with each other anyway.

- There is some pressure from the US labor market, but the lack of profitability for tech firms in general, combined with lack of funding, means that Canadian firms can't afford to compete with the likes of Google and Apple, even if they wanted to. Wages have risen, but not by a significant enough amount to narrow the gap.