Mary was certainly not an `unwed mother’. She was found with child by her prospective husband Joseph, who was reassured by G-d in a dream not to fear taking Mary as his wife.
When Mary gave birth to Jesus our Redeemer, she was a wife and now a mother.
Oh, what’s next, that old Jesse Jackson chestnut about Mary and Joseph being a `homeless couple’ while they were in Bethlehem?
Mary and Joseph had not yet been wed. That’s simply a biblical fact.
Joseph was considering putting her away which was his option.