It was part of the practices of the pre-Islamic era for a man to attach another man’s child to himself. He claims paternity of another man’s child and gives him his name. This is a clear wrongdoing and that is why Allah has forbidden adoption and revealed: “Call them by their fathers’ name, that is more just in the presence of Allah, and if you do not know their fathers, then they are (still) your brothers in the religion and your friends” Q33:5

The wisdom behind the forbiddance of adoption is the preservation of lineage and protection of rights. Although, Islam forbids adoption, it still highly encourages goodness and kindness to children as far as the principles regarding it are observed.