The necessity of modelling building behaviour has pushed the field forwards. For software we know that modelling and verification works in principle, but little time is spent on improving the methods because there's no demand
We’ve got the tools to explore unknowns.
Now, as to regulation. It could be written in a way that would relieve that “developer-of-record” out of responcibility provided they did their due diligence and, if new unknown happened that wasn’t foreseen the regulations will adapt and change and make a learning out of it, just like it was with building industry and road rules.
We don't have methods for reliable spelling, however...
If you're working on a bridge, you known exactly the terrain you're required to span. The engineers battle with a lot of integration issues, but at least they know what they're dealing with.
With software development, well, who's to say what integration issues that millions of people might face?
While software development is completely making things up as you go because it hasn’t ever been done before. Any kind of government regulation would end up as a box checking exercise that wouldn’t add any more safety and probably introduce problems when products have nonsensical decisions added in to fit with some requirements.