From Wikipedia:
The National Electrical Code, 2008 edition
The National Electrical Code (NEC), or NFPA 70, is a United States standard for the safe installation of electrical wiring and equipment. It is part of the National Fire Codes series published by the National Fire Protection Association (NFPA). "National Electrical Code" and "NEC" are registered trademarks of the NFPA. While the NEC is not itself a U.S. law, NEC use is commonly mandated by state or local law, as well as in many jurisdictions outside of the United States. [1] The NEC codifies the requirements for safe electrical installations into a single, standardized source.
I didn't think the NEC was law per se; after al, it changes when updated, and that doesn't make older home illegal. Granted, states and municipalities can incorporate the NEC as part of local requirements, therefore law, but the NEC itself is not law, IMHO.
Agreed, I think having half-assed inspectors is a waste of time, but I have seen a helluva lot of dumb and dangerous things done by people too smart to ask for inspections. And I have learned a lot from watching inspectors.
Having said that I would also like to get a hold of the inspector who "inspected" the house my wife bought before I met her. Since then I have had to jack the house up to replace the totally rotten termite-eaten beams that bastard missed. I also know independent inspectors (find your own, not the ones the realtors suggest) who do a great job.