First, it may be done by unlucky couple between husband and wife who have not been blessed with children. It's better for infertile woman or wife to do it. It is done as they hope that someday they will have a baby. Second, the main purpose of adopting children is helping others. The foster parents help unlucky parents to care their children. They must help waifs and strays like they help their own children. Third, never adopt unlucky children for nefarious purposes. Islam does not allow doing this. For example if we want to adopt child in order to change their religion, to force them to be a beggar, thief, pickpocket, slave, and prostitute. It is bad thing and it should not be done. Fourth, in dividing the foster parent's inheritance when they are passed away, the role has been established. Islam has discus it. It is allowed to give foster child part of the inheritance by making their written or spoken will first. It must be done by foster father before he is passed away.
As a conclusion, adoption is a legal and blessed thing to do in Islam religion. It is not banned since it is done for positive purposes. Foster parents take the unlucky children into their family and they are regarded as their own children. They should not adopt for negative purposes. In adoption, there are many things that should be known as foster parents. The rights of waifs and strays, and their relationship in Islam among the main family need more comprehensive discussion.