In response to the first post, it's because property went with the males all the way back from Ancient Greek times. Women were barely above slaves in terms of rights. I mentioned this in another thread, but Odysseus returns home from the Trojan war to find his house with a bunch of male loiterers trying to woo his wife so they can become king of the area (high ranking lord, basically) and get all of the property. As a widow, as it's assumed Odysseus died like so many others, she cannot rule and only carries the property- and it cannot be passed to her son until he's past a certain age.
This was also the case in the show Downton Abbey for like 90% of it - the father marries a woman who's family is wealthy to save his estate, then his heirs all die from the Titanic and such and either he needs to come into money super fast, or his eldest daughter needs to marry someone with money - since the eldest daughter carries the dowry when there are no sons.
It's a way of showing rank and titleship. I believe even Fiddler on the Roof had this kind of idea. I know the first gothic novella "Castle of Otranto" was heavily steeped in this idea of dowry through the daughter to the person she married. In that case, it was similar to Downton Abbey - whoever she marries will become the lord of the estate - be it an old creepy man, or a young prettyboy. (You can guess who everyone roots for lol)
It's also a right of knowing where you come from - some families and cultures are super steeped in knowing where they're from. Lots of families that came across into the US through the Statue of Liberty had their names changed to something the people there could pronounce or thought it was (Tanya being changed to Tilly from American Tale's kids movie for example), and it's very real. Some names, like "Salt" were randomly put on.
It also showed what kind of person you were in terms of trade. If you were a miner, or a clothmerchant, or a blacksmith, you'd have a certain last name attached to you. The idea of marrying for love, and not money, is super new and the idea isn't picked up every where. Look at that movie Crazy Rich Asians - the family wants their son to marry a Chinese woman, bred and born in China, not a Chinese American.
There's also that show Roots on PBS that shows many times where they can trace lineage back through the last name and for the African Americans, a lot of their last names or honor of tribe or anything was lost when they were slaves. Instead, they took the last name of their owner and would be recorded as such.
Spanish-Mexicans have a unique tradition where they have two first names - Maria-Angellica or something like that - and the kids want to shorten it to just one and the parents are adamant that your name is both names and continue to call them both. I've had students who's names are like .... 5 words because of their culture.
(Another striking thing that's amusing about first names, though it shouldn't be as funny, is when parents name their kids something but don't know how to spell it [like Precious as a name] and it ends up a typo for life. Or it's written nontraditionally: Jennifer vs Jenifer vs Jenipher and so on.)
Back to my point about names being changed, a lot of Chinese, Korean, Taiwanese, Vietnamese and other SEA and Asian people when in the US do not use their native names - even some students of mine from Hawai'i don't use their actual names - and instead adopt a more Greco-Roman type name since it's "easier to say correctly". I can't think what one girls name was, but it was Hawai'ian and no one could say it except the other Hawai'ians and we all were stuck calling her Melody or something because that's what her name translated to.