As someone building his own house right now, I exactly understand the complexities here. It's outrageous. Many of the laws are counterproductive and the use of certain products is lobbied for by the companies making them.
Drywall, insulation, plumbing, electrical all these products work their way into the laws encoded in building codes. Many of the companies have members on the committees of these "non-profit" organizations.
It's terrible. It's part of the reason houses cost so much.
Everyone wants their piece of the pie. If you want to house yourself, first you must feed everyone else.