I'm borrowing from one of my answers of several weeks ago, this one recalling the idea of a what folklorists call "blind motifs." These are references to something that the bearer of the tradition does not understand, but that is maintained in the tradition without clear meaning, referring to something that has been forgotten. We have that situation with our "touching or knocking on wood." No one is entirely sure why we do that, and in the absence of clear explanation, it is easy to "explain" the cultural practice. Many say that we do that as a thank you to the elves who lurk in the forest among the wood of trees. Folklorists often settle on a more likely explanation that it refers back to a English children's game of the nineteenth century, a game something like "tag" where a child was safe if they were able to reach out and "touch wood." The first explanation is pure speculation that cannot be proven since we lack primary sources to link the practice with the explanation. The second has at least some common ground, but it is hardly proof, and any good folklorist will advance it with caution.