The Court ruled that the group of all female employees was way too big and too varied to be treated as one group. That is, they said you can't assume that because one woman was denied a promotion due to her gender that all other women who were not promoted missed out because of their gender.
One of the big reasons that Walmart prevailed is that they have a policy of allowing managers to have discretion. Because individual managers had discretion over who to hire/promote/train, the justices said you couldn't say all female employees were treated the same way.
Yes, letting managers manage has been shown to not only be good business, but to be good protection against big lawsuits.
Now to be clear, this case had nothing to do with whether or not the named plaintiffs actually were discriminated against. To my understanding (remember, I'm not a lawyer), these women can still sue, but will have to do so as individuals. If they were illegally discriminated against, they can still have their day in court and hopefully win. And if other women feel the same way, they can file suit as well.
But, they can't say we were all treated the same because Walmart had the policy of expressly not treating every store the same. Managers were allowed to manage. They were allowed to recognize that what worked in Newark, NJ might not be quite so effective in St. George, UT.
Hopefully this will inspire more companies to allow managers to make their own decisions (within the framework of the law, of course) which will lead to customized solutions to business problems. (Or that's the hope, anyway.) There's nothing more frustrating than being bound by a company policy, written by someone who has never been in your state, let alone your shoes.
And that's good for everyone.
For further reading: