I can’t fathom what the legal justification for this ruling could be. What does the federal government have to do with building codes? It makes no sense.
Edit: this article doesn’t do a great job of contextualizing the national significance of the ruling. Here’s a more in-depth article about the Berkeley ruling which, unless overturned, threatens a wide variety of local climate rules in the US: https://www.berkeleyside.org/2023/04/19/berkeley-gas-stove-ban-ruling