It may seem strange that verses 10-20 are given the option to be lumped together verses 21-28. In the first section Jesus angers the Pharisees because of his and his disciples rejection of the hand-washing rituals and because of his teaching that what comes out of the heart is more important than what goes in the mouth. And in the second section Jesus is challenged by a gentile woman on the breadth and width of his ministry. Jesus responds to her in a condescending and insulting tone, calling her a "dog." She responds by saying, "Fine, then treat me like a dog and give me the crumbs." In the way she refers to him as "Lord, Son of David" she is also the first one to make a messianic reference to him. He is astounded by her faith and obliges.
These stories don't seem to fit well together, but they just may. Matthew's audience of early Christians are dealing with some complicated issues, about whether or not they have to follow the old Jewish food laws, and about whether Jewish Christians and Gentile Christians can eat together. These made for some complex tensions. Perhaps Matthew placed these stories together to respond to these tensions. (For more on this see: Preaching Through the Christian Year, Year A, pp 407-408).
It's easier to say what we believe than to practice what we believe. So for the early Christians it might have been easy to say that "God is the God of all" or "in Christ there is no Jew nor Greek" but putting these abstract thoughts into practice would have been much harder to do. Perhaps these stories are there to remind them that Jesus was more concerned about what comes out of the heart than about what rules you follow and that the first messianic proclamation actually came from a gentile woman. Reminders of things like these were almost certainly needed to help resolve issues of Church governance in the first century. They're also needed today.
When the earliest Stone-Campbell churches were formed, African-American worshippers had to enter the church by climbing a ladder from the outside. Then they were relegated to the balconies. Saying that Christ welcomes all to the table was perhaps harder for those early Disciples to say than to practice.
What are our challenges today? We say we are an inclusive church but we still wrestle with issues of exclusivity. We say we believe in the radically inclusive love of God but our congregations still have a nasty little habit of excluding people because of race, sexual orientation, or social status. Perhaps these stories of Jesus will be helpful for us to hear. Remember, to say something is very different than to actually believe it, and to believe it is very different than actually living by it.