This isn't about state law and local law. The local laws are ignoring federal law.
There are three choices.
1. Change the federal law
2. Pretending the federal law doesn't exit.
3. Enforce the law.
Most of us on this web site would like to see the law enforced and those that have been pretending the law doesn't exist be thrown into jail.
In some cases, the locals (and I see that even states) pass laws that inhibit reporting to the feds, and that encourage providing entitlements to people who are in the country illegally. IOW, the localities are doing more than pretending the federal laws don’t exit; they are passing local laws that conflict with any obligation to report.