Let a judge try to order Trump around or hold him in contempt. Who is going to arrest Trump? The US Marshals who are under his command? The FBI who is under his command?
Obama had no problem protecting his subordinates from Congress or the courts by using his executive power. The least Trump can do is protect himself.
Side note: contempt of court is a pet peeve of mine. Would we accept it if a President announced in a meeting that the didn't think the person he was meeting with was properly deferential and had him tossed in jail until he apologized? No, we would call that President a tyrant. Yet judges do that all across America all the time and we just shrug. That bothers me.