Why are Matthew 5:17-20 and Matthew 25:31-32 central texts in understanding the theology of the Gospel of Matthew?
Matthew 5:17-20 is one of Jesus' strongest statements in support of the idea that He had come into the world to fulfill "the Law or the Prophets" (Matt. 5:17). While Jesus did fulfill the Old Testament prophecies about the Messiah who was to come for the salvation of the world, this was not the main purpose of the verses you cite. His main message in these verses was condemnation of the Pharisees, who were misusing the Law. They had created legalistic requirements and regulations that were very difficult to obey, and claimed to have great authority and righteousness because they made a show of obeying these rules outwardly while not honoring the intent of the Law, which was to love and serve God. Jesus taught that the way to achieve righteousness in God's sight was to believe, to have faith and to love God and others, not to follow rules that had no love in them.
Matthew 25:31-32, a vision of the final judgment scene, is most noteable for its statement that "All the nations will be gathered" (Matt. 25:31). This indication that Gentiles as well as Jews would be brought before God for judgment at the end of time was unprecedented. The Jews had always assumed that they, and only they, were the chosen people who would be saved by God. For Gentiles to be included was a completely new idea. The ramifications of this inclusive love for all nations was not truly realized and put into action until after Jesus' resurrection, although Jesus did talk with foreigners and healed some non-Jews during His ministry on earth.