Some kids do better than others at weddings, it seems to me. One has to trust the parents to know what their kids can handle. Two years olds, as Mrs.Allboys suggests, are bound to act like two year olds, regardless of the occasion. And even older kids can get restless. What seems like a beautiful, exciting day to us adults may be very boring to a 6-year-old.
But I'm not clear about whether or not the 6 knew she was invited to be a bridesmaid or not or it her parents had agreed to this before the bride and groom set the date. It's possible the bride and groom just planned the date that way, assuming their niece would be there.
Op mentions that the little girl's dress was "just bought" but doesn't say by whom. I question whether the parents would buy it and then decide not to bring her. It sounds more like the bridal couple provided a dress for her before the parents told them for sure if she would be attending or not. I get the feeling a lot of assumptions were made here without the 2 couples really communicating. Maybe I'm wrong, of course.
But the parents have made their decision, the bridal couple has accepted it and so has the op. If the op complains or makes any further offers, I doubt it will do any good. Most likely, they will just say, "Don't tell us what to do with our children!" That seems to be the way young parents answer these days, fwiw.