You're missing the part where he was harassing citizens while he blindly fished for undocumented people. That's what he was sanctioned for, and his contempt conviction came out of his ignoring the judge's order on that. To paraphrase an alt-right catchphrase, lock him up! What do you people on the right have against law and order?