I had an interesting experience with my cat. I turned around and saw her standing there, and because I was not expecting her to be there, I was surprised and jumped. It has probably happened plenty of times in different ways for most people, but the long and short of it is that sometimes we get shocked and react to something that is completely innocuous.
The brain has different parts that are responsible for recognizing things (especially faces) and for reacting to danger. One part is responsible for “fight or flight” whereby the body almost entirely automatically reacts to perceived threats. Another part is responsible for analyzing visual input and determining what is being looked at.
This scared-by-the-familiar response is very revealing and to be honest, not surprising. It shows that the part of the brain that detects and reacts to danger functions at a “lower-level”, a more base instinct and thus faster and at a higher priority than the part that recognizes objects which is a somewhat higher-level function (though obviously not exclusive to humans). This is not a surprise because fight-or-flight is a survival instinct and more important (at least more immediate) than object/person recognition.