News to me. You probably mean that a residential building that does not meet locally adopted housing code would be ineligible for Section 8 tenants. But such a violation would also make it likely that you would be cited and fined even if your tenants were not Section 8 tenants.
It has to do with grandfathering. There are things that pass for existing tenants that won't pass for Section 8.
It’s not that hard to flunk a Section 8 inspection. Just make sure the bathroom fan isn’t working. When you get a real tenant, just fix the fan - although the tenant might not even complain about it.
Another way to flunk: Put double lock deadbolts on the doors - ones that require a key to open from the inside.
I never actually tried that one though.
There are other ways - I got out of the landlord business before COVID.