Then Joseph being raised from sleep did as the angel of the Lord had bidden him, and took unto him his wife:
When Joseph took Mary as his wife, becoming the earthly adoptive father of our Lord, he was taking an early death for himself.
He was the heir to the throne (as demonstrated by his geneology earlier in the chapter). Jesus could not present himself as the King of the Jews, the heir to the throne of David, if there was a prior claimant to that throne. Joseph had to die first.
Joseph is never seen during the earthly ministry of Christ, though Mary appears several times — he must have been dead already. In all the accusations the religious leaders made against Jesus, all the reasons they gave for rejecting Him, they never once denied His legal claim to the throne, as the heir of the royal line. Would they have neglected this line of attack if they could have used it?
Did Joseph know, when he took his wife, that he was taking on himself an early death? We don’t know, but it would hardly be surprising if those in his line had discussed, down through the generations, all it would mean when Messiah finally came.
Just something to think about….
Update: Eight More Thoughts on Joseph