Interesting that the tanuki isn't completely childlike and conceptually understands death. It's not that she didn't understand that taking the place of a dead child was bad, she just didn't understand that the child in the picture was dead. She probably would never have done it if she had known about how humans honor their lost loved ones.