In ancient history writing, writers would leave gaps in a genealogy account to make a person look good. Matthew's gospel story didn't. He has made people today question why Jesus' geneology is what it is. Men where only in genealogy accounts typically, but he mentioned women (Tamar, Rahab, Bathsheba) who didn't have a great reputation. Why is he telling all the bad? Why not skip over it? Most did. What is his point?
Why? Because Matthew was with Jesus 3 years, and Matthew knew that all these "bad" people were the point of the story he was about to tell. He knew it was a story about light coming into darkness. Forgiveness over condemnation. And it was Matthew's story, too. He was a tax collector, lower than a sinner. He saw Jesus seek out sinners over and over again, so he was sure not to leave any out of his genealogy account. They reflected why Jesus came in the first place. The rules had changed, and I've come to realize that failures and sinners are the point of Christmas in the first place. They are why the story is told each year. Jesus came to not call the righteous but the sinners.