The office of Sheriff in Arizona is a constitutional, elected office. The elected Sheriff is accountable only to the people of the state of Arizona and the constitution of the state of Arizona. The 10th amendment forbids the federal government interfering with those issues not addressed by the US Constitution and which are thus left to the states.
According to the US Constitution, in order to be a citizen of the United States one must be a citizen of a state and left the definition of a citizen up to the states.
The 14th amendment (1868) states "All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the State wherein they reside."
That seems pretty straight forward.
The problem arises with "No State shall make or enforce any law which shall abridge the privileges or immunities of citizens of the United States; nor shall any State deprive any person of life, liberty, or property, without due process of law; nor deny to any person within its jurisdiction the equal protection of the laws."
The question is, how can the federal government pass a law making unauthorized entry into the US a crime, then demand the constitutional, elected Sheriff not enforce that law?
The federal government has two options. Allow law enforcement agencies to enforce the law (novel concept, I admit) or repeal the law.