It hails from when family lines were important, and you can practically only have one line reflected in a name. Unsurprisingly, most societies considered the male's name to be the dominate lineage of interest, although that doesn't hold true 100% of the time.
> you can practically only have one line reflected in a name
Not true at all. You can trivially have two family names in a full legal name. In fact many cultures do exactly that to this day.
Also worth noting that the male's name being preferentially propagated makes a lot of sense in a society where the best off frequently inherited their vocation from their fathers.
> Just because there is an alternative doesn't mean society will adjust.
"It isn't practical to do" and "society at large didn't go this direction" are very different statements.
Hyphenation is two names in a trench coat. Maintaining two names indefinitely works just fine as long as you discard rather than endlessly compound. Presumably the only requirement is that it be straightforward to trace any given lineage.
The traditional approach is for women to keep their maternal name and discard their paternal name on marriage while men do the opposite. But of course any scheme could work, up to and including each person arbitrarily choosing which name to discard (not sure how they decide on ordering in that case).
Another historical approach is the Foo Barson, Baz Fooson (Barson) approach. That scheme treats the male and female lines as being entirely separate so it doesn't quite match what you're after but it was quite practical.
Preserving more than one lineage and providing a cohesive family name isn't practically easy, and society did not go that direction, and that likely isn't a coincidence.
Discarding names doesn't preserve lineage. If you need a book to trace the names, then the point of using a name for lineage has failed.
> The traditional approach is for women to keep their maternal name and discard their paternal name on marriage while men do the opposite
It sounds like this scheme is "men keep one name lineage, women keep another".
Which, IMO, has the practical drawback of not identifying the current family unit. Lineage was important, but so was gathering all folks together into a household. When taxes, religious ceremony, etc. occurred, there was one household name on the roster responsible. This was particularly important in societies where men held certain rights for the household.