In Judaism, one's name has always been considered to be extremely important. As names were bestowed, the meaning of the name was the prime consideration of its selection. The name often embodied characteristics that the parents wished the infant to have, or experiences surrounding the birth or the look of the infant.
The close association between the name and the person led to the common belief that changing a name would prevent the evil spirit from harming the person. If the name were changed, the evil spirit would not recognize the person. This belief is embodied in the Talmud (Rosh Hashanah 16b): "Four things can abrogate the decree of man and they are: charity, supplication, change of name and change of action."
These superstitions carried over in Eastern Europe to the naming of children. In Poland, for example, when several people have died in a family, a newborn child is given a name that is never uttered, so as not to give the evil spirit any opportunity. Often, a nickname was given to the child, such as "Alte" (Old One), Chaim (Life), or Zaida (Grandfather). This was a way of deceiving the angel of death. A similar practice was adopted for the extremely ill.
In Ashkenazi Judaism, the custom arose to name a child after a deceased relative. Infants were not named after the living because the angel of death might mistake the infant for the adult and take the wrong one. Some felt that using the name of a living relative might rob the adult of their soul, as the name was tied very closely to the soul.
Source: Shamash .