Neither the U. S. nor Canada provide proper support to aspiring medical doctors and other scientifically inclined students. Even with the immigrants, their numbers are too few.
Training requires 7-8 years university and institutional practice or more. This is extremely expensive. Only those from well-to-do families, or the exceptionally brilliant who can obtain scholarships (too few) can afford it. Meanwhile their highschool friends who went into plumbing or whatever are prosperous, have a family, and are not faced with life-long study to keep up with medical or scientific advances in their field.
Students in India and China who have the drive and the ability get more support, moreover the economic system is such that support costs are much lower.
Of course some of these foreign graduates want the good life with a Porsche in the driveway, as offered (or imagined) in the U. S., Canada, etc., and will emigrate in any case.
The situation has developed over a long period of time. In research, in the 1950s, we were raiding British universities for trained graduates; now with the growth in the UK and EU, it is the Asiatic graduates who are filling the gap.
(My doctor, trained in Ireland, looks back and laughs, she would have ended up doing as well if she had stayed, what with the surge in prosperity in that country. Her attitudes have become Canadian, and she wouldn't go back in any case. A doctor in my neighborhood, from India, left to avoid the social and religious problems there.)