These codes are often produced by a single organization, "International Code Council", a non-profit somewhat analagous to ISO, which I believe sells them to governmental jurisidictions which adopt them as law, sometimes with some customizations or "choose A or B" choices.
One of the parties to the lawsuits involved happens to be a Y Combinator funded company, "UpCodes".
https://archinect.com/news/article/150195411/supreme-court-r...
https://www.constructiondive.com/news/construction-code-purv...
https://techcrunch.com/2020/11/16/a-court-decision-in-favor-...
In the US, if there are any cases where an ISO code is mentioned in law as legally binding in some way, it's possible someone could try to challenge the ability to keep from sharing the relevant standard text freely. It's not exactly the same situation, but this supreme court decision provides a possible path anyway.