First of all, I don't think it's reasonable to distinguish here between a "company" and any other third party; the third party could just as easily be an individual. Consider, for instance, a forum or site run by an individual.
A party to a trial (such as a named defendant) is afforded a variety of rights. Among many others, they receive legal notice of the case with sufficient time to prepare, can face their accuser in court, can defend themselves, provide testimony, file legal documents and motions, and many other things an interested party might wish to do. A third party doesn't automatically get those rights.
> Presumably there is a process where they can refuse and get a court hearing about the validity of the order? Or is the issue that there is no such process?
The issue is the default assumption that they must comply, rather than the usual innocent-until-proven-guilt process (or, in a civil case, preponderance-of-the-evidence). Consider a third party who received no legal notice of the existence of the case, has no opportunity to prepare or offer any defense, who effectively has the case decided in absentia, and who first hears about the case when they get a court order requiring them to do something. That doesn't seem reasonable.
(As with any generalization like this, some exceptions might apply. But that's the kind of thing court procedures like preliminary injunctions exist for: "something irreparable will happen if they don't stop now, before the case concludes". So even then, I think it makes sense for the third party to be a party to the case and for them to have the opportunity to challenge the preliminary injunction just as any other defendant could.)
If they want to overturn that court order, they can potentially do so, but the default assumption is that they must immediately comply with it or face legal penalties themselves. And depending on the nature of the court order, often they must comply while pursuing their own legal action, rather than having the opportunity to make a case in advance.
All that said, a third party may wish to voluntarily cooperate, in a case where they agree with the matter (or don't disagree and don't want the fight). And in some cases, they may have individual liability if they don't; for instance, a reseller of a recalled toy may themselves face liability if they don't cooperate with the recall, while they may have some legal protection or defense if they do cooperate.