Mary was betrothed to Joseph, but never married in the full sense, because it was never consummated. Joseph was a good man chosen to be the head of the Holy Family and the guardian and protector of the Divine Child.
So Jesus was not a bastard or illegitimate in the eyes of God. Which is the only perspective that matters.
A marriage is between a human man and a human woman. Not G-d and human. A union blessed by God. In this case, since the union was with God and Mary, it was certainly blessed by God and was in that sense a "marriage."
So since Mary was already married in effect to Joseph, doesnt that make G-d a polygamist? or at least that makes Mary an adultress. G-d did not get Mary pregnant. That is a common myth in pagan cultures. And again, Isaiah 7 was not a prophecy about a virgin birth anyway.