A few points on why this is happening beyond those noted above.
1) The exchange rate
Right now, CAD is .78 USD.
So if salaries were otherwise equal (which they are not), a U.S. company can get a 22% discount by shifting jobs to Canada.
That matters. It doesn't matter if the talent isn't there or willing/able to move; but its a critical reason if the above are workable to consider it.
2) Wages are not yet equal. Tech talent in Canada are well paid, the average income is six figures...........but it still trails the typical Bay area income by as much as 1/3, and
probably 1/4 on average, IF dollars were taken at par.
Below is a quote from 2017, so numbers have changed, but it gives you a sense of where things were, particularly when decisions now taking effect were made.
"
The study was conducted with over 280,000 engineer profiles. San Francisco salary clocked in at average of $134,000 USD and was trailed by Seattle at $128,000 and New York City at $120,000. Average salary in Toronto was $74,000 USD (or $97,000 Canadian)."
Source:
https://planetweb.ca/news/toronto-sa...hired-reports/
*****
3) Health insurance/benefits are way cheaper in Canada. With core coverages provided by the state, and embedded in routine taxes; the cost of employee benefits for supplementary healthcare (prescriptions, dental, eyeglasses etc.) are much lower than typical employer health benefit costs in the U.S.
4) Not just 'immigration'........but foreign students......Canada has shifted in recent years to nearly unlimited foreign student education. This,in turn has been part of the driver of housing growth and costs. Because foreign student typically pay greatly inflated tuition vs domestic students (though still slightly below U.S. numbers adjusted for currency); Canada has implemented very liberal work rules for students while studying here.
More than that, it has created a very big carrot to stay beyond college with liberal work experience provisions extending one's VISA by 3 years or more, and if you are gainfully employed, setting a path to citizenship.
That, in turn, juices the labour supply which is both a talent availability issue and helps keep wages in check.
Though, wages are closing towards parity w/the U.S. (adjusted for currency); as demand has spiked.
Between all of these factors, and gov't incentives that are similar to the U.S. if one brings in a large job count (property tax increase deferrals, gov't guaranteed loans etc. etc.)
Canada writ large is competitive.......with Toronto, Vancouver and Montreal all doing well.