The problem is widely known but frequently ignored by understaffed cities. The cities would lose far too many affordable rental accommodations and as such do not want to be too heavy handed.
Cities tend to follow-up on phoned-in or sometimes only on written requests. The most common issues neighbors have are: too many cars, too much noise and weird smells / drugs ! Thus: screen tenants accordingly !
Legalizing most suites is very costly due to fire code regulations, second meters for gas, electricity or water, and thus not frequently done. Only a few cities have embarked on licensing requirements, mainly in over-regulated and over-taxed Ontario, none to my knowledge in W-Canada where we tend to invest.
Thus, having an illegal suite is a risk that you must assess, like any other potential risks in real estate like rising interest rates, falling prices, ex-migration, structural issues, tenant issues, expenses ... as stated in my opinion it is one of the smaller risks but worth not taking for some, but for others.