Unlike the epistles, which have the author's name at the beginning, the gospels do not say who wrote them. How did the names Matthew, Mark, Luke, and John get attached to them, and how certain can we be that these are the actual authors?
They are named that way by tradition and we cannot be 100% sure that the tradition is accurate.
Then there are questions like how does Q measure into this, or was their a Q to begin with? (My Hebrew professor actually believed in the traditional order Matthew-Mark-Luke). (Personally, my guess is that there actually was a gospel penned by Matthew in either Hebrew or Aramaic, it was then translated into the Greek and amended to become the Gospel we know today, the original would serve as Q, however. Of course, I am a programmer, not a theologian).