Why is everyone so against just telling her mom? I don't understand how telling her beforehand is wrong?

I would certainly tell mine. She would rather know now than to never see dd use the gift.
Teaching your child to appreciate a gift is important and my child always shows appreciation no matter what the gift. But if someone buys her something that I know she will not like and if there is plenty of time to fix the situation, I would try to let them in know in a nice way.
For instance, my mil bought blankets for all her granddaughters one year. She told me that she bought dd one with Hannah Montana on it. I said, "oh, ok. she's doesn't really have anything with Hannah, she's more of a High School Musical girl but I bet she will like snuggling in it to watch tv" and I left it at that. When dd opened her gift, it was a HSM blanket. MIL got the message, wasn't bothered by it at all and did whatever she did to get dd something she would prefer. Dd loves the blanket and still has it on her bed rather than folded in a closet or thrown in the corner.
I really don't get what the problem with that is.