Yes, and the more common outcome is not a dramatic shutdown — it is an order to bring the suite up to standard or take it out.
Enforcement is usually complaint driven. A neighbour objects to parking or noise, a tenant complains about a safety issue, or an unrelated permit application puts an inspector in the house. It can also surface at the least convenient moment: when you go to sell, when your buyer's lender orders an appraisal, or when you make an insurance claim.
The awkward truth is that an unpermitted suite can sit quietly for years and then become a problem in a week, for reasons entirely outside your control.
By the time it is your title, it is your problem. The seller who built it is not the person the order is addressed to.
Check the City's secondary suite registry and confirm the property's status with the City directly. A listing that says legal suite is a marketing claim, not evidence — and neither is a second kitchen, a separate entrance or a seller who says it was done properly. If suite income is part of how you afford the house, verify it in your condition period.
More on this: unpermitted work in Calgary homes → and what makes a suite legal →.