"Let's back up one step: do the pilots have to follow the judge's order or not?"
Absolutely not. A judge has no authority to radio a pilot and tell them to do anything. I would have ignored a call like that. Sounds like spoofing.
"And what about the crew on the ground? Do They have to follow the order, or do they get a veto?"
I'm not sure what you mean by the "ground crew." The only people I can think of in this case who would make a difference would be ATC and whomever you file the flight plan with. Once the flight plan is filed, ATC has no reason not to execute that plan. It's basically an order. The flight crew and ATC are obligated to follow it. This is a very unusual situation. Jets aren't normally turned around unless there is a conflict or terrorist attack-something like that that is very visible and recognizable. This would have probably required a representative of DHS or CBP to contact the FAA, determine where the plane was, and contact the controlling ARTCC. Because this is very much an in-extremis directive, proof would have likely been requested.
Once the aircraft leaves US airspace, it would be up to the dispatcher to direct any changes to the flight plan. And even then, the change would depend on the amount of fuel on the jet.
If you want to blow up a Tesla...cool. Go buy yourself a Tesla and blow it up.
Otherwise...---- off.