Perhaps she knew who her father was and wanted to use his surname on her marriage.
It may be that the only place her father's name doesn't appear is on her birth certificate.
This is because the name of the father of an illegitimate child can only be included in the birth certificate if the father accompanies the mother when she goes to register the birth, and signs the register there and then.
So it's perfectly possible for the world and his wife to know who the child's father is, and for the child to be known by its father's name all its life, but for his name not to be on the birth certificate - if, for example he was a soldier or sailor or had some other employment that prevented him going to the registrar's within the required 21 days of the birth.