18Now the birth of Jesus Christ was as follows: After His mother Mary was betrothed to Joseph, before they came together, she was found with child of the Holy Spirit. 19Then Joseph her husband, being a just man, and not wanting to make her a public example, was minded to put her away secretly. 20But while he thought about these things, behold, an angel of the Lord appeared to him in a dream, saying, "Joseph, son of David, do not be afraid to take to you Mary your wife, for that which is conceived in her is of the Holy Spirit. 21And she will bring forth a Son, and you shall call His name JESUS, for He will save His people from their sins."
22So all this was done that it might be fulfilled which was spoken by the Lord through the prophet, saying: 23"Behold, the virgin shall be with child, and bear a Son, and they shall call His name Immanuel, "which is translated, "God with us."
24Then Joseph, being aroused from sleep, did as the angel of the Lord commanded him and took to him his wife, 25and did not know her till she had brought forth her firstborn Son. And he called His name JESUS.
We were just told the genealogy of Jesus Christ through Joseph. We are now hearing the story of the birth of Jesus from Joseph's perspective. When I think about it I am awed by the story of Mary, but this account is pointing out the importance of Joseph. I hadn't thought through this from his side of the story much before.
Imagine being Joseph. Mary was betrothed to him, they were to be married. And now he found she was with child. Were they already married when he found out she was pregnant? It says "Joseph her husband" and "Mary your wife", so it sounds like they were already married at this point of the story. He was a just man. He wanted to do what was right. There would have been no problem with him ending a marriage after finding his wife was pregnant and he was not the father. He could have made a public example of what appeared to be her indiscretion. Isn't stoning the normal punishment for such a sin? But he must have cared for her very much since he was thinking of simply bringing about their separation secretly.
There are several important points I see in what the angel told Joseph. First of all, the angel called him "son of David". As with the previous verses, we are being reminded that Jesus would be born into the family of David. Yes, Joseph knew he was from the family of David, and that some day a child would be born into the family of David who would save their people. But it was probably one of those things you would imagine would happen to one of the other thousands of sons of David. He was just a carpenter who wanted to marry the girl he loved. Here an angel was reminding him he was a son of David, and that his wife would have the child who will save the people.
Also, note that the angel said to not be afraid to take Mary as his wife. I think this is letting us know that he was planning on putting Mary aside, not because he was angry but because he was afraid. I think he still loved Mary and still wanted her for his wife but was afraid of what would happen if he married her. He was a just man, he wanted to do what was right. Was there another man he now needed to worry about? Would he be able to trust her after this? What if others found out, what would happen to him, what would happen to Mary? How would he feel about this child? He was just a carpenter who wanted to marry the girl he loved. But the angel was able to put away all these fears by explaining that the child was of the Holy Spirit. But of course that raises all new fears. Being told that he was to raise up a child conceived by the Holy Spirit that would save the people from their sins as was prophesied would be even scarier than how to deal with a wife that was pregnant by someone else. He was just a carpenter who wanted to marry the girl he loved. But still, he was told to not be afraid to take Mary as his wife.
Another point is when the angel told him he shall call His name Jesus. It is a special honor and obligation for the father to name a son. Joseph was to name Mary's son Jesus. Joseph would be given the role of acting as Jesus' father in many ways as He grows from a child to a man.
It seems that Joseph was not only a just man, but also a very faithful man. It sounds like after hearing from this angel in a dream, immediately after waking he took Mary to him as his wife. If anyone ever suspected she had been pregnant before she married, they would assume it was by him. He would stand by Mary. He would act as father to her son. He would wait till after the birth of her son before consummating their marriage. He named Him Jesus as the angel commanded. He was just a carpenter who wanted to marry the girl he loved. He would help to raise the child who would save the world.