Most people overlook the genealogy section in Matthew. They think it isn't as important as the rest of the Gospel. But in fact, it's the opposite. This section lays the foundation for Matthew's arguments.
Matthew was arguing and proving Jesus' messiahship. The genealogy was theological and written in proper Jewish style. Matthew leaves out a few names, but the names he does include emphasize that Jesus truly is who He said He was. This genealogy is also historical. It fulfills what was promised to Abraham in Genesis 17:5-7.
Read Matthew 1:1-17
Matthew also included David in the genealogy. This proves even further that Jesus was indeed the promised Messiah.
The rest of the chapter explains how Jesus was born. It also shows how powerful God is and that His plan is bigger than we could ever fathom.
Read Matthew 1:18-25
Mary and Joseph were engaged to be married. That was questioned when Mary was found with child. According to the Jewish law, Joseph had the right to divorce Mary because she was considered unclean. Joseph respected the purity of the relationship, so that news definitely caught him off guard.
Before Joseph gave the divorce idea too much though, God sent an angel to explain everything in his dream. Joseph listened and did what the angel commanded.
Imagine being put in that situation, Mary or Joseph's. What would be your reaction? What happened was out of the ordinary. Matthew made sure to prove this by including Isaiah 7:14. It proves the prophecy was fulfilled.
Joseph and Mary were faithful till the very end. This example should challenge us to be faithful even if the situation seems impossible. God uses the least of us to accomplish His plans, only if we listen.