A couple of stories - first, in one jurisdiction a buyer was buying a new home. He had a home inspector look it over, even though it had a COO from us. The buyer came to us with the inspector's report wanting to know how it got it's certificate if all these items were wrong. The bottom line was, they might be wrong but they weren't in violation of the code (and in a couple of instances they weren't in that condition when we did our inspection). One of the points in particular that I remember was a bathroom window that had a crack in it. Well, first, it wasn't cracked when we had inspected, second, the code didn't say that a window couldn't be cracked. There were about 20 things that the inspector found, if I were the buyer I would have had the builder fix all of them prior to signing a contract, but they weren't against code.
Second, when I was still in Oregon I did some serious investigating into becoming a home inspector, to the point of taking a community college course in it. The course was great, like most CC courses it was taught by someone who had been doing home inspections for several years. I did bring up a couple of questions and right away the teacher asked me if I was ICC certified in residential (I had/have my combo), she said based on the questions she knew I did. While there was nothing wrong with having my certs, most home inspectors didn't need them because it was typically a mistake for them to quote code. Stick with what they know (and many of them, with some good training and experience are very good) and typically the inspections that they do and what they are looking for does not really address the code. They will point out a bad roof, but don't say if it does or does not meet code. Point out a bad foundation, but since they weren't there when it was put in, since they don't know all the particulars, they can't (shouldn't) say it does or does not meet code.
Finally, like UB said - a home inspector typically won't (shouldn't) say that something meets code or not. About the only exception would be to say something like the stairs are going to need replacing and the present design doesn't appear to meet present code, a new set of stairs will be required to meet present code - ditto electrical or whatever.
I've not heard of jurisdictions that REQUIRE that a structure be brought into compliance with the new code every time it changes hands. Typically that is why we have the old code books still around, so if there is a question we can check against the year/code that the house was built under. And ditto UB on the lender, it's a contract they can require anything they want, they can require that he blow a horn at midnight on the 29th of every month if they want; a wise client would question that requirement and not sign the mortgage.
Just my 2 cents.