The U.S. Supreme Court seemed to struggle over whether some of the nation’s largest hospitals should be allowed to sidestep federal laws protecting pension benefits for workers.

The justices considered the cases of three church-affiliated nonprofit hospital systems being sued for underfunding pension plans covering about 100,000 employees. But the outcome ultimately could affect the retirement benefits of roughly a million employees around the country.