I thought I recalled that this final part (doxology) does not appear in the earlier versions of the gospels but in the Didache. It may have been added to an early version of the gospel and was carried along as those versions were transcribed.
Wait - found it. This is from Wikipedia but is in line with what I recalled (guess if you stay here long enough something sinks in):
The doxology of the prayer is not contained in Luke’s version, nor is it present in the earliest manuscripts of Matthew. The first known use of the doxology, in a less lengthy form (“for yours is the power and the glory forever”), as a conclusion for the Lord’s Prayer (in a version slightly different from that of Matthew) is in the Didache, 8:2. There are at least ten different versions of the doxology in early manuscripts of Matthew before it seems to have standardised. Jewish prayers at the time had doxological endings. The doxology may have been originally appended to the Lord’s Prayer for use during congregational worship. If so, it could be based on 1 Chronicles 29:11. Most scholars do not consider it part of the original text of Matthew, and modern translations do not include it, mentioning it only in footnotes. Latin Rite Roman Catholics do not use it when reciting the Lord’s Prayer, but it has been included as an independent item, not as part of the Lord’s Prayer, in the 1970 revision of the Mass. It is attached to the Lord’s Prayer in Eastern Christianity (including Byzantine Rite Eastern Catholic Churches) and Protestantism. A minority, generally fundamentalists, posit that the doxology was so important that early manuscripts of Matthew neglected it due to its obviousness, though several other quite obvious things are mentioned in the Gospels.