MCSO has been doing immigration and immigration–related enforcement operations even when it had no accurate legal basis for doing so.
I recall there being a federal lawsuit against Arizona, brought by the Obama admin, for their enforcement of immigration law. Then again I also recall Obama admin having the highest rate of deportation in (recent?) history, so it's not like they were totally scuttling the whole border-security effort.
Anywho. I don't wanna sound like I'm endorsing the methods here. The concept I have in my head is, here's this old curmudgeonly let's-just-assume-he's-a-racist guy is out there doing his job. The court, and not the legislature, tells him that he has to do a different thing, and he says "no, the law says I do X," so he does X. The court predictably convicts him of doing X, and Trump then pardons him for doing X. That part and only that part makes perfect sense in my head.
X, assuming your assessment is on the level, is pretty gross. I mean people have been pardoned for worse, but not in the first year of the first term of a presidency. That's an odd tactical decision. The only way I can make sense of the administration's message here is if I assume that equation above -- "If X is the law, we do X." Still shaky though.
More generally, I fall into that camp where like, if California wants to set California policy, I think that's swell. I'm not in California, they can do what they want. Federal lawsuits to muscle state policy are, by their nature, offensive to me, and that is probably endearing me to the wrong moral side of this case. That's my bias, that's the only reason Sheriff Joe has my tacitly-implied non-condemnation here. I don't wanna sound like an apologist.