Canada doesn't "make it's people compete globally for homes."
Rather, it's a stable and successful place, that attracts foreigners with a variety of agendas, ranging from working here as foreign nationals to sending their kids to school here to trying to move here. The vast majority of home sales in Toronto are NOT foreign buyers, and of the ones that are, we don't know what percent are just investments and which have other agendas.
You can't just close the housing market. No one without citizenship / residency status would be able to work here. As an example, think about American actors who work on shows that are filmed in Toronto. Should they be banished from buying a home? Should vacation homes in Toronto be illegal?
The truth is, like most world-class cities, if you make an average wage, you have to choose between commuting, renting, or moving to a place with a much softer housing market.