Banks can’t sue a chain of supermarkets whose data system was breached to recoup their losses from reimbursing customers whose data was stolen, the U.S. Court of Appeals for the Seventh Circuit held April 11.

Although the banks had no direct contractual relationship with the market, all participate in the complex contractual web that enables the card payment system, the court said in an opinion by Judge David F. Hamilton. “This includes at least some risk of not being fully reimbursed for the costs of another party’s mistake,” it said.

Courts hearing commercial cases have traditionally declined to allow businesses...