The mere certification of a class-action suit can prompt defendants to settle in light of the sums at stake, and the justices struggled to find a way to distinguish between gaps in pay that might have benign explanations and those caused by unlawful discrimination.