I don't follow. USA has made laws, say, that owning most explosives without a tax stamp is illegal (interestingly there is a law that this same stamp is $0 for other weapons which put people in a precarious position of facing 10+ years in prison for not paying a $0 tax). If you happen to already have one before they passed the law, the law still applies to you, just not before the law goes into effect. And they might not even give you the stamp even if you try to pay for it, if you don't pass a check. They won't charge you for the time you had it before the law went into effect. But they will charge you for owning it today without the tax stamp. (Now you can argue that law is unconstitutional, either from the takings clause or 2A but not because it is retroactive).
That's kind of how I see the housing law. It would not be retroactive. It would be, that tomorrow owning a house without a sprinkler system would be illegal. And anyone who possess the house without one is violating the law. And if you don't agree with equal application to everyone, maybe the law should not be there in the first place.
> USA has made laws, say, that owning most explosives without a tax stamp is illegal
I think you're referring to the National Firearms Act (NFA) of 1934 and its treatment of pre-existing explosive devices and destructive devices. It is an interesting example of how retroactive tax laws can affect previously legal property ownership.
What I will say is that retroactive compliance requirements, while controversial, have generally been upheld by courts when applied to dangerous items affecting public safety. The explosives/tax stamp example demonstrates the tension between property rights, retroactive legislation, and public safety regulation.
I don't know that your overall argument that all new building requirements should be applied to all existing properties. Not only would it be incredibly expensive (and probably having an even worse impact on people with less means), but also highly impractical in some instances. Does that make sense?
That's kind of how I see the housing law. It would not be retroactive. It would be, that tomorrow owning a house without a sprinkler system would be illegal. And anyone who possess the house without one is violating the law. And if you don't agree with equal application to everyone, maybe the law should not be there in the first place.