Raising an Orphan
Our Sages taught (Sanhedrin 19b), “One who raises an orphan in one’s home is considered by Hashem to have bore him,” as we find that the children born to Merav, daughter of Shaul, but raised by her sister, Michal, were called “children of Michal.”
In addition to the tremendous merit of raising a child and the endless kindness associated with this Mitzvah such that this child is considered one’s own, the child must likewise respect his adoptive/foster parents, for there no way to fathom the amount of appreciation he must have for the people that raised him.
A Child Who is Not an Orphan
Maran Rabbeinu Ovadia Yosef zt”l writes (in a response quoted by Yalkut Yosef- Avelut, Chapter 30, Section 24) that although our Sages refer to raising an “orphan,” this does not mean specifically an orphan; rather, any child who cannot be raised by his parents for whatever reason is considered an “orphan,” even though his parents are alive.
Maran zt”l proves this from the Gemara (Megillah 13a) regarding Moshe Rabbeinu, who was called the son of Batya, daughter of Pharaoh, although his parents were alive because of the decree against the Jewish nation, their inability to raise him, and the fact that Batya saved Moshe’s life and raised him. The same applies to any other child whose parents cannot raise him in that whoever raises him/her is considered to be their parent.
Maran zt”l writes that if a child recites Kaddish for a foster parent, this is as beneficial as when recited by a biological child.
Last Name/Surname
If a child was adopted at an early age and adding their adoptive/foster parents’ last name to his would cause satisfaction to the parents, it is appropriate for the child to take on their last name, as a sign of respect. Indeed, Maran Ha’Chida writes (in his Kikar La’Aden, Section Gimmel) that he heard from the elders of Jerusalem that Hagaon Harav Gavriel Esperanza (quoted by several great Acharonim) was orphaned of his father and mother in his youth and was raised by an important woman and hired teachers and tutors to teach him Tanach, Mishnah, and Talmud. This woman’s name was Esperanza (“Hope,” in Spanish). When he became a great Torah scholar, he adopted the last name Esperanza as an everlasting tribute to the woman who had done so much for him. Thus, one should definitely pay tribute to the people who benefitted one so much and brought one to the World to Come by adopting their last name as a show of thanks and appreciation.