I am not versed in Illinois contempt law, but judges have very broad constitutional authority to sanction people or companies for intentional failure to comply with a lawful order. In this case, you could expect the judge to do something like order the company to pay five thousand dollars per day until they disclose the records.
There could be an argument that the judge could legally order the sheriff to seize their servers or throw the CEO in jail until the company complies, but for some reason stuff like that doesn't seem to ever happen in the corporate context.
It's a thing
https://cdn.ymaws.com/www.idc.law/resource/resmgr/quarterly_...
> This procedure is often called “friendly contempt,” a recognition that the contemnor has not acted “with contumacious disregard for the court’s authority,” but requires a contempt finding and sanction for the purpose of obtaining appellate review. See Klaine v. S. Ill. Hosp. Servs., 2016 IL 118217, ¶ 6; Zagorski v. Allstate Ins. Co., 2016 IL App (5th) 140056, ¶¶ 16-17. In many cases, the contemnor has even requested the finding and sanction for that purpose. See Ctr. Partners, Ltd. v. Growth Head GP, LLC, 2012 IL 113107, ¶ 20.
So this is the lawyer asking to appeal the original judge's order of disclosure, and this is the obscure process that makes that happen.
Maybe a night in jail isn't all that common though. Sure seems reasonable and effective.
I can't think of any off the top of my head, but I'm sure there are a few where the evil journalist or priest is held in contempt hindering finding the bad guy.