What’s the alternative? Governments pass regulations and all buildings must be adapted within 12 months? 36 months?
What of the buildings that don’t comply in time? Or can’t find trades to do it in time? Or we notice to our eternal shock that projects to ensure code tracking are priced at a serious premium?
Or, how many improvements to code would we decide weren’t desirable because of the costs of retrofitting, so now we lose even the low slope of improvement versus today.
consider Japan's housing market for ideas
This is a fairly well-trod path in economic policy circles, especially in Europe. You can either grandfather in buildings, perhaps with rules that line up with maintenance schedules anyway so that when something breaks anyway you replace it with the new standard (the HVAC world understands this well with refrigerants), or you sign yourself up for stunning, astronomical expense.
Not to mention, a lot of places around the world care about the look and character of historical locations. If a structure wasn't designed for central HVAC, for example, then there's often nowhere to hide the condenser units, air handle units or the ductwork. Same with insulation -- if that exterior wall wasn't intended to have it you've got a couple options and they both hurt.
Last of all, I'll mention labor. The type of skilled labor that can do any specific trade at all is relatively rare in the aftermath of the "college-or-bust" era, but the kind of labor you'd want for renovation work (fast, efficient, can tackle multiple different aspects at once without calling in different trades, and gets it right the first time to minimize disruption/call backs) is even more rare. To carry out some kind of massive renovation project at a national level even with infinite money you're talking about a generational timeframe just due to labor constraints.