Pretty much every organism with a brain has a sophisticated survival reaction to physical contact with any part of its body, because its brain is trained on nerve signals. Everything with eyes or sonar learns spacial awareness of objects and their proximity, velocity, directoion of motion. I think the clue is that biological brains are trained on a physical world with very complex rules and physics as well as reactions that arise from chemistry.
Words and images, audio and video, even virtual worlds with soft-body physics, are just flat projected shadows of the complexity of the actual world.
While true, so too are our senses: https://en.wikipedia.org/wiki/Aristotelian_physics
I wondered wtf was going on so I looked around and realized that some sort of bird of prey was circling overhead that triggered that reaction and behaviour. It got me thinking. Somewhere inside of her brain and therefore her genome was the equivalent of a pixelated black and white image of the outline of a bird of prey, and the algorithm that can generate that zig-zag pattern in muscle firings and a whole overall heuristic that can apply these patterns and others into a coherent strategy that manifested as the fight or flight behaviour that I saw.
No one taught her this as she never really spent any time with her parents or her litter as she was adopted quite young, and spent most of her time doing house cat things so it wasn't something that she picked up from her environment, so it seemed pretty innate to me.
It was very influential to me as a teen to ponder that if that bird of prey's genome encodes the full shape and structure and behaviour of it then in some fractal sense there's a low fidelity copy of the shape of that bird and also implicity the bird's behaviour through a counter prey behaviour encoded in the cat's genome.
On the other hand, even such basics may well make a huge difference.