Every earthly king has a family tree. Some have noble ancestors.
Some have embarrassing relatives. Jesus has both. Matthew doesn't sanitize His family tree.
Instead, he shows us something wonderful:
The King we worship isn't ashamed to identify with broken people, because He came to redeem broken people. The genealogy in Matthew chapter 1 is not merely a list of names proving Jesus' legal claim to the throne—it is a testimony that God's redemptive plan moves forward through ordinary people, flawed people, and even scandalous people, all by His sovereign grace. It prepares us to claim a King who doesn't merely reign over sinners—He comes from a family of sinners so that He might save sinners.