姓 is woman 女 plus born 生: the name you get from being born of a mother. China's oldest surnames — 姜, 姚, 姬 — carry the woman radical too, fossils of a matrilineal age when lineage traced through mothers.
百家姓 'The Hundred Family Surnames' has been memorized since the Song dynasty. 老百姓 'the old hundred surnames' means ordinary people — the population as a roll call of family names. Asking politely: 您贵姓? Answering humbly: 我姓李.
Born 生 of a woman 女 — the SURNAME you inherit.
Chinese women keep their surnames at marriage — and always have. The 姓 you're born with is considered unchangeable in a way given names are not.