The lawsuit alleged that the mass layoffs were “reckless and illegal” and would impede educational excellence across the country.