I will add to what has already been stated. It is interesting how the modern Bishops (influenced by hyper Protestant skepticism?) object to what the Pontifical Biblical Commission under Pope St. Pius X wrote back in 1911:
Seeing the universal and constant tradition of the Church dating from
the first centuries, which explicit testimonies of the Fathers, the
inscriptions of the codices of the Gospels,.. finally, the liturgical
usages of the Eastern and Western Church clearly record.
In support of Pope Pius X and the old Pontifical Biblical Commission, there is an early reliable church tradition attributed to Clement of Alexandria that the Gospels with the genealogies (Matthew and Luke) were “written first” (progegraphthai). See Eusebius' Church History, 6:14:6-7.
However, Stephen Carlson argues that it possible that the key Greek verb (progegraphthai) should be rendered “published openly” rather than “written first.” If so, Clement was claiming that Matthew and Luke were published openly, while Mark was initially written for a group of private individuals, without Peter’s initial knowledge or authorization.
According to Irenaeus, in his work, Against Heresies (3.1.1), Matthew issued a written Gospel among the Hebrews in their own dialect, while Peter and Paul were preaching at Rome. After their departure, Mark, the disciple and interpreter of Peter, handed down in writing what had been preached by Peter. So it appears that it is while Peter and Paul were in Rome that Matthew wrote, but it was after they departed that Mark wrote. Mark and Peter may not have had Matthew's original Gospel (written in Jerusalem?) to use, or even to endorse.
In his De Viris Illustribus, Jerome states that Matthew wrote in Hebrew letters and words for the sake of the Jews and then it was translated into Greek. He writes that "the Hebrew itself is preserved even now in the library at Caesarea...” Although, to be sure, later on Jerome wrote how the Hebrew original texts were nowhere extent. See here. So, it could be that the version Jerome spoke of was one of the many expanded interpretations of Matthew's original work that Papias spoke of and that Luke alludes to in his opening of his Gospel.
Jerome also says he "was given the opportunity of transcribing this volume by the Nazarenes who use it in Beroea, a city of Syria.” He adds that Matthew, when quoting from the Old Testament, had used the Hebrew Scriptures not the Greek Septuagint (RO 203 & DVI, ch 3&7). See here. This is interesting in that the Greek version of Matthew's Gospel often quotes from a Greek translation of the Old Testament, the Septuagint.
That reference from Jerome appears to indicate that Matthew's original Hebrew Gospel was given a "high level" translation into Greek.
Daniel Wallace writes the following:
... Matthew might have written several pamphlets of dominical sayings in
Aramaic. This is what Papias is referring to (λογία, after all, is not
“acts” but “discourses, sayings,”). When Mark’s Gospel was published,
Matthew’s audience wanted a framework for the sayings of Jesus. It
would have been at this time that Matthew organized the sayings into
five thematic units, and used Mark’s Gospel as a framework for them.
One of the evidences of this internally is that the narrative material
in Matthew is almost merely “stage setting” for the didactic
material—each narrative section (except for the birth and passion
narratives) concludes with a message by Jesus. The point is that
Matthew himself may well have written a document very much like Q (is
it even possible that he wrote Q?!).
That being said, it should be pointed out that scholars note that the second temple Jews, including Philo, used the word λογία to refer to scripture.
Wallace suggests the possibility that Mark recorded Peter's sermons:
... while Peter was still alive. At about the same time,
Matthew published isolated sayings of Jesus in Aramaic for his and
other Jewish-Christian communities. He would, therefore, have been
unaware of Mark’s work, just as Mark would have been unaware of
Matthew’s. Over the next few years, the dominical material of Matthew
would have been translated into Greek. At the same time, Matthew’s own
community wanted a framework for these sayings, in light of the
publication of Mark’s Gospel. Mark was at hand for the framework, and
some of Mark’s material duplicated Matthew’s (e.g., the Olivet
Discourse) and was already in Greek. Hence, Matthew used Mark as his
basic framework, even where sermonic material was found in Mark. Then,
Matthew reorganized these isolated sayings of Jesus into five great
sermons (though one was already found in Mark—viz., the Olivet
Discourse). For the rest, Matthew simply supplemented Mark with a
fulfillment-motif, birth narrative, etc. This hypothesis both affirms
Markan priority and Papias’ statement about Matthew’s ‘Hebrew.’ As
well, it strongly affirms that Matthew implicitly recognized the
reliability of Mark’s Gospel.
Perhaps for the high level translation, Matthew used parts of Mark's Greek version and then reorganized his original work on the sayings of Jesus into sermonic sections?
The Bishops write:
... it is hardly likely that a companion of Jesus would have followed
so extensively an account that came from one who admittedly never had
such an association rather than rely on his own memories.
Actually, considering some of the divisions going on in the early Christian community, it is likely that a companion of Jesus like Matthew would have wanted to endorse the preaching of Peter that was written by Mark. A subtle way to do that would be to utilize Mark's Gospel as reference points in highlighting certain aspects of the life of Jesus for catechetical purposes.
In short, Matthew might have supplemented Mark by translating his Hebrew/Aramaic Gospel (Papias, Εβραιδι διαλεκτω) by utilizing Mark's Gospel as reference points.
At any rate, there is no need to dispute the early church tradition. In fact, using the "Ancient Documents" principle in the legal field, the benefit of the doubt should be given to the claims of those who were custodians of the original manuscripts. For example, in McCormick's Handbook of the Law of Evidence (1972: 549, Section 223 and 747, Section 323), there is this summation:
An ancient writing is usually regarded as sufficiently authenticated
if the offering party shows that it has come from high antiquity and
is unsuspicious in appearance [no evident marks of forgery], if found
in a place of custody natural for such writing [found in the proper
repository], and deemed by the law to be authentic and credible. The
age requirement probably assures that there will be a special need for
dispensing with the heresy rule . . . In such cases [where ancient
writings are sufficiently authenticated], the burden of proof to the
contrary devolves upon the objector.
The Pontifical Biblical Commission's argument for Matthew being the Gospel writer of the book in his name can be sufficiently sustained by the explicit testimonies of the church fathers. They were the custodians of the manuscripts, along with the inscriptions contained in the codices of the Gospels. The formulations εὐαγγέλιον κατά + name or κατά + name are the same in all the Gospels. See Simon Gathercole's The Titles of the Gospels in the Earliest New Testament Manuscripts.
The titles of the Gospels appear to indicate that the evangelists are not meant to appear as "biographical" authors, but to bear witness in their works to the one saving message of Jesus Christ.
The skeptical argument is that the titles operate more as placeholder names, where the Gospels have been “handed down” by church traditions affixed to names of figures in the early church, rather than the author being clearly identified.
However, just like the Gospels of Mark and Luke were written by them and not just the sources of them are from their teachings, so it is likely to assume that Matthew was the author of the Gospel of Matthew. This is also corroborated by the unanimous claims of the earliest church fathers that write about the origin of the Gospels.