|18. And the birth of Jesus Christ was as follows: Now His mother Mary had been betrothed to Joseph; but before they came together (had sex), she was found to be with child of the Holy Spirit. 19. And Joseph her husband (he was considered legally married), being a righteous man, and not willing to expose her publicly, was planning to divorce her secretly. (Matthew 1:18 - 19, HBFV throughout)|
In Biblical times, a betrothal was considered a binding marital agreement between a man and a woman. It was usually accompanied by a partial payment of the full "bride price" paid by the groom (or groom's family) to the bride's father as compensation for the loss of his daughter (see Genesis 29:18 - 20, Exodus 22:16 - 17, Deuteronomy 22:28 - 29). Many times the betrothal period lasted a year, but could be longer. During this period the couple lived apart (usually with their parents) until the man came for his wife (see Matthew 25:6) to take her back to his home and consummate the marriage.
Betrothal is something like the modern practice of couples being "engaged" where they promise to marry each other. Instead of a partial payment of the bride price, the man usually buys the woman he has proposed to an engagement ring. There are, of course, major differences between being engaged in today's world versus being betrothed in Bible times.
As stated previously, betrothed couples (like Mary and Joseph) were considered, under God's law (intended to be applicable to all Israelites, and ultimately the world, not just to Jews), to be legally married. If a man decides to end the relationship any time after the betrothal agreement is made (including after consummation), he must pursue legal steps to do so.
1. When a man has taken a wife and married her, and it comes to pass that she finds no favor in his eyes because he has found some uncleanness in her, then let him write her a bill of divorce and put it in her hand, and send her out of his house (Deuteronomy 24:1, see also Jeremiah 1:3, 8,).
Additionally, unlike today where sex before the wedding is anything but scandalous, the penalty for having sex during the period of betrothal could be punishable by DEATH (Deuteronomy 22:23 - 24).
What if . . .
As Joseph was pondering what he should do in regard to Mary, the "angel of the Lord" appeared to him in a dream and told him to continue his marital relationship with her (Matthew 1:20). What if he had decided to disregard what the angel told him? What would have happened if he had decided to divorce her?
Jesus needed to be the LEGAL descendant of David as well as his biological descendant. Inheritance was passed via males in a family, with the firstborn son receiving a double portion (Deuteronomy 21:15 - 17). Christ was prophesied to inherit the throne of David (Luke 1:32), a right he legally received through Joseph (Matthew's lineage of Christ traces his legal lineage to the king). A divorce would have meant he had no legal right to the throne and would have broken prophecy (see Isaiah 9:6 - 7).
Roman law, in difference to the customs of Jews living in the province of Judea, required males (not females) to travel to their ancestral home for census (tax) purposes. This required Joseph to make the journey to Bethlehem, the home of his ancestor David (Luke 1:27, 2:1 - 4). Mary undertook the long journey (roughly 80 miles) because, in part, she would be with her husband who could protect her and help with the birth. If she was divorced it would have made far more sense, given her advanced state of pregnancy, to stay in Nazareth her hometown (Luke 1:26 - 27) where her family lived. This, however, would have broken prophecies stating the Savior would be born in Bethlehem (Micah 5:2, Matthew 2:5 - 6).
Lastly, if Joseph would not have continued to be married to Mary he would have disobeyed the direct revelation from the Eternal that her pregnancy was unique and that it fulfilled righteousness for him to continue the relationship (Matthew 1:20, 24).