Who's To Blame For My Pain?

I have noticed in various places, when a kid gets hurt and starts crying, sometimes, the grown up in charge rushes to comfort them but does so in strange way. For example if the child has stubbed his toe on the table, they beat the table and say, “Bad table, bad table!” Or if the child has banged their head on the wall, they sternly wag their finger at the wall and say “Bad wall!” Sometimes the child is encouraged to participate in punishing the offending inanimate object.