While I'm not about to say that a child should be allowed to get away with that, it's a scientific fact that children don't think in the same way that adults do. Things that adults take as rude, ungrateful, selfish, etc. are often only because the child is reacting without thinking. If my child (I don't have any, unless you count the 240 annually

) did that, I would explain that to do that was rude, and that one should always be gracious when receiving gifts. Only if the child repeated that behaviour would I be more severe, and yes, I would take the gift away or give it to charity.
I remember being very young - four or five - and when the new minister at my parents' church came to introduce himself and say hello to me, I got terribly shy and turned away. My father gave me a dressing-down right there, telling me it was "rude to turn your back on someone", etc. I've never forgotten that, and I still think he overreacted. He could have just said to the minster, "She's a bit shy," and told me later not to do that. To this day I feel uncomfortable about that because at that age I truly didn't know better, and I'm sure the guy thought I was a rude brat (from how my father spoke to me) instead of just a shy little girl who didn't know what to do when meeting someone imposing. (I can remember this because I have a photographic memory, BTW - freaks people right out when I mention things they said in front of me 22 years ago!)
Children's way of thinking does become more sophisticated, but at the age of six or seven they still can't comprehend things the way an adult does. That's why, when I ask kids why they must do their homework (+- age 11) they usually answer in terms of, "So I don't get into trouble." Thinking further into the future, like they must do it in order to become literate and thus do well so they can get a good job, etc. is still beyond them. And even as a teacher I expect too much sometimes.
Of course, if the child is always being rude and ungracious, then either his parents are slacking in their duties or he's defiant and needs to be punished.