Upvote:-3
To answer this question, we must first be clear on the scholarly consensus of the origin and authorship of the gospels. From An Introduction to The Gospels by Mitchell G. Reddish, O.L. Professor of Christian Studies, Chair of Religious Studies, Stetson University:
Matthew and Luke contain a large amount of material found in no other gospel. These materials are sometimes called Special Matthew or M and Special Luke or L. Both Special Matthew and Special Luke include distinct opening infancy narratives and post-resurrection conclusions (with Luke continuing the story in his second book Acts). In between, Special Matthew includes mostly parables, while Special Luke includes both parables and healings.
The "synoptic problem" is the question of the specific literary relationship among the three synoptic gospels (Matthew, Mark, and Luke) — that is, the question as to the source or sources upon which each synoptic gospel depended when it was written. Ancient sources virtually unanimously ascribe the synoptic gospels to the apostle Matthew, to Peter's interpreter Mark, and to Paul's companion Luke—hence their respective canonical names. A remark by Augustine of Hippo at the beginning of the fifth century presents the gospels as composed in their canonical order (Matthew, Mark, Luke, John), with each evangelist thoughtfully building upon and supplementing the work of his predecessors—the Augustinian hypothesis (Matthew–Mark).
In modern Biblical studies, there are 12 proposed lineages for which gospel is derived from which. You can find an overview here.
The most widely accepted proposed lineage is:
This proposed lineage explains why Matthew contains content not found in Mark or Luke. Most scholars believe the internal evidence inside Matthew's Gospel suggests that Jesus' disciple could not have written the Gospel we have today. Two reasons for this rejection of the traditional view of authorship appear frequently in the literature. The chief argument rests on a broadly accepted theory that Matthew's Gospel incorporated much of Mark's and that no original disciple of Jesus would have depended as heavily on Mark's Gospel as Matthew's Gospel seems to have depended on it - see Ulrich Luz and Helmut Koester. Matthew: A Commentary, 3 vols., trans. James A. Crouch (Hermeneia; Minneapolis: Augsburg, 1989, 2001, 2005), I, 94.
Another line of argument is based on the evidence that Matthew's Gospel appears to be written to a 70-CE audience which is trying to deal with tensions between law-abiding Christian Jews on the one hand and their more liberated Hellenistic Jewish and Gentile Christian brethren on the other.
As to the specific topic of Matthew's Judgment of the Sheep and Goats, this has been one of the most widely debated paragraphs in the history of Christianity. There are more than 1400 known commentaries for this specific part of the gospel in the last 1900 years - see Sherman Gray's, The Least of My Brothers: Matthew 25:31-46: A History of Tradition.
Over the centuries, the Catholic church has issued several ecclesiastical pronouncements which invoke Matt 25:31-46. The most recent Papal issue was in 1943, when the Roman Catholic Church received an influential encyclical from Pope Pius XII called Divino afflante Spiritu which was intended to guide Catholics who interpret Scripture. All official pronouncements, to my knowledge, do not give an explanation as to why this specific passage is only found in Matthew, but focus on how it should be interpreted.