Stranger anxiety emerges when your baby’s memory has taken a leap forward. Up to now, babies have pretty good “recognition memory.” That is, they could recognize things and faces and environments with which they were already familiar. Witness that huge, warm smile they save for when you magically reappear. But, what emerges around now is “retrieval memory” which is the ability to bring back to mind something that is not currently present. It is linked with a better sense of object permanence, when babies can find objects that are completely hidden. So, out of sight is no longer out of mind.
Resource from : http://www.webmd.com