I think it does that so that it takes you to that town showing the damage. You fix it, exit the town, then check right away and all good.
Oddball way of triggering the go to this town and fix what's busted, but hey, at least they do. If you're building something else in the city,
you can either swap out, or just pay cash.
Civ 6 would just leave you there and no notifications, nada. You'd have to check the town yourself.
(and you couldn't pay gold to do insta repairs either. )