I think that it has to do with opression, about being the low one in the social hierarchy.
Women are discriminated against, sneered at, criticized, kicked out sometimes for breastfeeding (and for other reasons to do with being a woman). So they turn around and do it to other moms when they feel that they are/were powerless.
IMHO I've had this experience with nurses. The doctors boss them around and treat them like dirt, so they sometimes pick on the patients. (Yes I've also had wonderful loving awesome nurses, but not always.)
Or racism. My gut reaction, right or wrong, is that I'm even more horrified when I encounter someone from a marginalized ethnic group being racist toward another group (than I am if they were upper middle class whites.) Shouldn't they know better? I think. Wouldn't they be reluctant to discriminate, to hate, having been on the receiving end themselves? No, not always.
I do think it has to do with their own problems. Seeing a mom nursing brings up powerful feelings and if they had a bad time or were put down, they need to unload on someone else to feel better.
And let's face it, some people are just negative about everything!