I see a lot of comments being like "what's the point of laws if they get ignored." Well, we're on a CS forum, and we have VMs, containers, and chroots, right? We break rules all the time, but recognize that it is best to do so around different contextualizations.
There's a few points I think people are missing:
1) The government isn't monolithic. Just like your OS isn't. It different parts are written by different people and groups who have different goals. Often these can be in contention with one another.
2) Containerization is a thing. Scope. It is both true that many agencies need to better communicate with one another WHILE simultaneously certain agencies should have firewalls between them. I bet you even do this at your company. Firewalls are critical to any functioning system. Same with some redundancy.
A sanctuary city is not a "get out of jail free card." They do not prevent local police from contacting ICE when the immigrant has committed a crime and local police has identified them. They are only protected in narrow settings: Reporting crimes to police, enrolling their children in school, and other minimal and basic services. If they run a stop sign and a cop pulls them over, guess what, ICE gets contacted and they will get deported[0].
Forget human rights, think like an engineer. You have to design your systems with the understanding of failure. So we need to recognize that we will not get 100% of illegal immigrants. We can still optimize this! But then, what happens when things fail? That's the question. In these settings it is "Conditioned that an illegal immigrant was not found, do we want them to report crimes to the police or not?" "Conditioned that an illegal immigrant was not found, do we want them to pay taxes?" How the hell can the answer be anything but "yes"? You can't ignore the condition. Absent of the condition, yeah, most people will agree that they should be deported. But UNDER THE CONDITION it is absolutely insane to not do these things.
There is, of course, another solution... But that condition is fairly authoritarian. Frequently checking identification of everyday persons. It is quite costly, extremely cumbersome to average citizens, and has high false positive rates. I mean we can go that route but if we do I think we'll see why a certain amendment exists. It sure wasn't about Grizzly Bears...
[0] They may have holding limits, like not hold the immigrant more than a week. Maybe you're mad at this, but why aren't you mad at ICE for doing their job? You can't get someone out there in a week? Come on. You're just expecting the local city to foot the bill? Yeah, it costs money. Tell ICE to get their shit together.