The custom of a woman adopting a different surname through marriage is not a Portuguese-Brazilian tradition.
The mandatory adoption of the new name led to unusual combinations, as in the (not uncommon) case of both spouses having the same surname, when the woman's surname was kept.