The short answer is YES, the home inspector is a code inspector.
I imagine in the few seconds it took to read that sentence, some folks are becoming excitable and conjuring up some very interesting expletives.
The first known written building code was implemented by King Hammurabi in Babylon in 1758 B.C. The code established that people who are designing and building for others are accountable for the quality of their work. Very harsh penalties were levied as a means of enforcement. Let your imagination determine what those penalties might have been.
It is noteworthy that after over 4000 years the purpose of established building codes remains the same, the protection of the people who live or work in a building.
If established building codes had no part in a home inspection, what would be the standard for determining the proper installation, function, and safety of all the systems and components of a home? The inspector's Opinion? Experience? Preferences? Whims? Not unlike scientific research, there must be an established basis and approach. The basis being Building Codes, the approach being the Standards of Practice established by your state or association.
The 100 to 150 hours of training required by many states and the two major national Home Inspection associations, ASHI and NACHI, rarely discuss Codes, but is based on Codes to establish a basis to evaluate a system or component. I am not sure that many of us going through the training really realized this. By the way, that 100 to 150 hours of training is the minimum entry level requirement. Good Home Inspectors have considerably more and are always studying and learning more.
Is a Home Inspector a Code inspector? Yes. Is a Home Inspector a Code enforcer? NO, absolutely not! Code enforcement is the job and purpose of your local or state AHJ (Authority Having Jurisdication). It is the AHJ's purpose to enforce Codes and approve or disapprove new construction, remodels, roofing replacement, HVAC replacement, and the list goes on, based on Code compliance.
This brief discussion is not an exhaustive dissertation by any means, but is meant to provide some insight into what is the basic standard for what should be a uniform approach to provide a uniform result. If this has stirred some thoughts or ideas. please feel free to comment. Open dialogue is always welcome and always productive.