It's also worth mentioning that unlike NYC and SF where this may actually be a real issue, buying a place just to put on Airbnb in Toronto is hard to do in a profitable way. Airbnb rents in most parts of Toronto make it impossible to turn a profit worth the hassle, and most I know who have considered it decided not to based on the economics.
I suspect the political motivations are the mayor (who is generally sensible) wanting to be seen at least doing "something" to address rising rents, as well as catering to the various industry lobbies and other politicians who are generally uncomfortable with any industry operating in a largely unregulated way.