Moed Katan 25b: Rabbi Chanin, son-in-law of the Nasi, had no children. He prayed for children and got one, but on the day his son was born, he died. The eulogizer said, “Happiness was turned into sorrow, rejoicing and sadness joined together. At the time of his joy he sighed, at the time that he was graced, his grace went lost. They named him Chanin after him.
מועד קטן כה ע”ב: רבי חנין חתניה דבי נשיאה הוה, לא קא הוו ליה בני, בעא רחמי והוו ליה. ההוא יומא דהוה ליה ־ נח נפשיה. פתח עליה ההוא ספדנא: שמחה לתוגה נהפכה, ששון ויגון נדבקו, בעת שמחתו נאנח, בעת חנינתו אבד חנינו. אסיקו ליה חנן על שמיה.
On 28 Sivan 5701 (June 23, 1941) the German army marched into Lithuania, murdering most of the Jews in its path and herding the rest into ghettos. Among those in the Kovna ghetto was the Lieberman family. The husband had gone to Vilna for a few days, leaving his pregnant wife and young daughter at home, when the Germans attacked. From then on, all communication was cut off between Vilna and Kovna, and Mrs. Lieberman had no idea whether her husband had survived or not.
One day, however, a friend of her husband came from Vilna and said that he and several hundred other Jews, including her husband, had tried to escape from Vilna on foot. In the middle of the road from Vilna to Kovna, German airplanes flew over them and rained down upon them deadly fire, killing many of them. From then on he did not see her husband, and so he assumed he was among the dead. Hearing this, the young wife cried uncontrollably over her husband. Left alone in the world with a young orphan daughter and a baby soon to be born, she would not be consoled and declared that she would go to her grave mourning for her husband.
With Hashem’s kindness, she was able to survive the war hiding out among the gentiles. After the liberation, to her shock, her husband came back from the plains of Russia, where he had fled and survived. The couple’s happiness was boundless. But then the husband noticed his wife calling their young boy by his name. “I named him in memory of you, thinking that you had died,” she explained. He refused to accept this. “One cannot name after a living person. We must change the boy’s name, and even his official documents, so that no one ever calls him by my name again.” The couple came to Rabbi Ephraim Oshry, posek of the Kovna ghetto, to ask what they should do.
He began by proving that in the time of Chazal, they did indeed name children after living people. When Rabbi Nosson advised a mother on how to do bris milah safely, she named the baby Nosson (Shabbos 134a). When Rabbi Elazar son of Rabbi Shimon paskened that 60 women were ritually clean, they named their babies Elazar (Bava Metzia 84b).
That is when they named after a gadol hador. As far as naming after an ancestor, we find the Tanna Rabbi Prata son of R’ Eliezer, son of R’ Prata the Great (Gittin 33b). Either the grandfather was already deceased and we would say that they only named after dead ancestors, not live ones; or the grandfather was still alive and we would see from here that although they named after live ancestors, they did not name after fathers, only grandfathers.
[Similarly, we find that the line of Hillel’s dynasty was Hillel, Shimon, Gamliel (Hazakein), Shimon, Gamliel (of Yavneh), Shimon, Rebbi Yehuda Hanasi. If the grandfathers were alive, we would see from here than they named after the living, but not a father.]
The Sephardim carried on this custom, but the Ashkenazim today name only after the dead. If an Ashkenazi were to name after a living grandfather, we would leave the name, since he followed a valid custom. But naming a son after a father was never done in any Jewish community. The only time we find this in Chazal was in the case of a father who died just as his son was born: Rabbi Chanin (Moed Katan 25b).
As to the reason why sons were never named after fathers, Rabbi Oshry proposes that when the father calls his son, he would look crazy in the eyes of others. Also, among Ashkenazim, the father would feel that a son named after him was a bad sign for him.
Furthermore, R’ Yehuda Hachasid wrote in his Tzavaah that one should not marry a girl whose father has the same name as him, or a girl whose name is the same as his mother’s. Presumably the reason for this is that if the young couple lives with their parents, one would not be able to call the other by name (as the Rambam says in Mamrim 6:3). If the son and the father had the same name, it would similarly lead to disrespect for the father when other members of the family call the child.
Therefore, Rabbi Oshry ruled that the name of the boy should be changed, both in everyday life and on official documents.
Source: Shailos Uteshuvos Mimaamakim v. 5 Siman 13