My father has three surnames on his birth certificate and knew he had five sisters. But he discovered his mother and father were unmarried, each was married to another partner. His father had another family of seven children. Some of this family were twenty years older than my father. This discovery caused a rift between father and his own father and mother. Dad's mother had a daughter with her husband, naming the girl after herself. My paternal grandfather seems to have commuted between his families using the rail network. The names on birth certificates and censuses vary as my grandmother supplied officials with names. Her real husband was a traveller.
Grandfather was a businessman and seems to have supported both families, but I recently discovered his bankruptcy, he had taken out a loan for his son (same name) and his wife was the petitioner. They seem to have reconciled though as towards the end of her life she moved round the corner to his second family. On the death of his first wife and after the death of my grandmother's first husband, they married. After all the children had been born. Naturally she called herself 'Mrs Stokie' when she was living with grandfather. The surnames on Dad's birth certificate are Grandfather's, the man's she was married to and her maiden name. Dad's sisters' birth certificates show various versions of these names, they sometimes called themselves 'Stokie' and sometimes gave their mother's married name. Those that married gave their name as 'Stokie'.
I suspect that before modern times officials simply wrote down the names they were told. I consider tracing my ancestors a work in progress... What was traumatic for Dad is a source of fascination for me. Grandfather was a Victorian / Edwardian rogue and chancer. In those days divorce was not possible for ordinary people. He appears in a family wedding photograph of a child of his first marriage as a couple with his first wife next to him. Everyone is smiling.