Taking her husband’s surname after marriage is neither forbidden (haram) nor mandated under Sharia law. As a result, both viewpoints, that it is haram or that it is essential, are incorrect and extremist in some manner.
To adequately grasp this topic, it is necessary to first acknowledge that one of the Sharia’s basic aims (Maqasid) is the preservation of one’s own descent (Nasab).
Changing one’s parentage and attributing oneself to someone other than one’s birth father is unlawful and a grave offense. Many Quranic and Sunni passages openly state this; for example:
Allah Most High says, “… And He [Allah] did not make your adopted sons your [real] sons. That is [merely] a word uttered by your mouth. And Allah says the truth and He shows the [right] way. Call them by [the name of] their [real] fathers; It is more equitable in the sight of Allah. And if you do not know their fathers, then they are your brothers in faith and your friends…” (Qur’an 33: 4-5)
The context for this verse is that in the days of ignorance (jahiliyya), people considered adopted children as biological in every way and credited them to the adopter, creating the appearance that the foster parent is the true father. The Prophet of Allah (may Allah bless him and grant him peace) adopted the name Zayd ibn Haritha (may Allah be pleased with him), and the Companions (may Allaah be pleased with them) started to refer to him as “Zayd ibn Muhammad.” They nicknamed him Zaid ibn Haritha when the aforementioned passage was revealed. As a result, the preceding verse was revealed to establish the notion that an adopted kid is not the genuine child of his adoptive parents.
Sa’d (Allah be pleased with him) claims to have heard Allah’s Messenger (Allah bless him and give him peace) say, “Whoever claims to belong/ascribes himself to other than his [biological] father, knowing that he is not his father, then Paradise will be denied to him.” (Sahih al-Bukhari no: 6385 and Sahih Muslim)
However, the preceding passage – and comparable words – must be read in their right context. The concept is not that using any name or attribution after one’s name other than that of the father is forbidden; rather, Shari’ah expressly forbids attributing one’s ancestry to anyone other than one’s biological father or saying that someone else is one’s biological father. This is illegal since it misleads others and it includes being ungrateful to one’s parents and denying them their fundamental right to parenthood.
It is forbidden for someone to claim descent from anyone other than his father. It is haram to imitate the kuffar by removing the wife’s surname and giving her the husband’s name; it is also a kind of deception and degradation of the lady. There is no blood connection between the husband and wife, therefore how can she use his surname as though she is descended from him? She may be divorced, or her spouse could die, and she could marry another man. Will she keep changing her surname with each man she marries? Furthermore, there are regulations associated with her being named after her father, which deal with inheritance, spending, and who is a mahram, among other things. Taking her husband’s surname ignores all of that. The spouse is called after his father, and what does she have to do with her husband’s ancestors? This contradicts basic sense and facts. The husband has nothing that distinguishes him from his wife, therefore she should take his surname while he takes his father’s.