I suspect it all depends on what folks mean why they say sanctuary city. IIRC, it mostly started by various cities saying, if come report a crime, we won't send you to immigration if you don't happen to be here legally.
It consist simply in not asking the citizenship status of someone who reports that they have been the victim of a crime.
There have been a few notable examples of sanctuary cities not turning over known criminals who were also illegal immigrants. A lot harder to justify really and doesn't do much to help the majority of immigrants legal or illegal.
I covered some of those previously. It's never as simple as stated. It frequently involves janky pseudo-legal stunts such as bogus warrants. The jurisdictions properly reject these, because it's necessary to do so in order to preserve the claim that the sanctuary jurisdiction is operating faithfully according to law, not out of discretion. But of course these occurrences can be spun to argue that it is naked obstruction.
In other cases, the jurisdiction argues that handing over criminals or alleged criminals for immigration proceedings would deprive the criminal justice system of its corrective power. If someone is charged and convicted of, say, rape, but is then lawfully deported before a criminal sentence can be served, then it can be argued that the state's right to justice in criminal matters has been undermined.
First highlight, how so? Immigration is pretty clearly a federal issue. Can cities, IDK, decide to allow counterfeiting?
No, but that's a straw man. The issue is cooperation in enforcing federal law, not attempts to decriminalize or ignore federal law. As matter of fact, my local police force does not investigate violations of federal counterfeit law, and cannot be compelled by the federal government to do so on its behalf.
Second highlight, I'm curious where the sanctuary city is a principle in constitutional law. Where is that noted in the constitution?
The 10th amendment, as interpreted in
New York v. United States (506 U.S. 144 [1992]) and
Printz v. United States (521 U.S. 898 [1997]). The 10th amendment is the source for the doctrine of state sovereignty. Being a sovereign generally means no other government can tell you what to do.
Third highlight, that's almost certainly how Trump will handle it. Hey, that's a nice federal grant you've got there, it would be a shame if something happens to it, so why don't you drop this sanctuary city thing huh?
In general, current precedent remains that grants of assistance from the federal government cannot be conditioned on behavior unconnected with the purpose of the grant. And "unfunded mandates" similarly remain unconstitutional. The difficulty in enforcing a court decision upon a lawless executive remains a point of discussion.