Because a lot of Canadians are racist, also people have somehow been convinced that the housing crisis and the lousy job market are the fault of foreign students and immigrants rather than the fault of landlords and other disgustingly rich people.
Pretty much, same in the US after all, under capitalism, why build 3 affordable houses that sell for $100k when you can drive up demand and the price with one similar house that costs $600k.