Personally I think building codes are a total joke.
No outside wall IMO should ever be 6 freaking inches thick, every outer wall should be at least 12" thick and minimum R30+ as far as I am concerned.
Attic insulation IMO should be no less than R80.
"code" where I live which is in NC and in Climate Zone 4 is R15 for walls and R38 for Attic.
Sadly nothing I can do about my walls because like everyone else they are paper thin and frankly I seriously doubt actually have R15, my bet is R10 when it was built in 1984 and now that cheap fiber board insulation I am sure is less than R10.
My attic originally "was" R38 blown in pink manure but after squirrels got in there and stomped it all down and just age my bet is about R20.
A few years ago I added R38 "EcoBatt" on top of what is probably about R20 old insulation for something close to R60 in my attic which to me is absolutely dead minimum.
Made a big difference in how our upstairs bedroom felt in the Summer, the AC ran A LOT less and just felt more comfortable.
The more insulated the house, the less it cost to heat and cool, the quieter it is inside.
Building code should be DOUBLE+ what it currently is IMO.