I have puzzled over this for many years.
Luke’s version of seemingly the same event records it this way:
Then he opened their minds to understand the Scriptures, and said to them, “Thus it is written, that the Anointed One should suffer and on the third day rise from the dead, and that repentance and deliverance from sins should be proclaimed in his name to all nations, beginning from Jerusalem. (Luke 24:45-47)
Some say that Matthew’s account originally stated that Jesus actually said, “baptizing them in my name” and that this was changed to “baptizing them in the name of the Father, and of the Son, and of the Holy Spirit” by later Trinitarians. However tempting it may be to adopt that idea (and I am disposed to adopt it myself), the evidence points to the text as we have it in Matthew 28:19 as being what Jesus actually said.
The earliest extant Christian writings outside the New Testament also quote it as “baptizing them in the name of the Father, and of the Son, and of the Holy Spirit.” It is quoted that way in the writings of:
Clement of Rome (A.D. 30-100)
Polycarp (A.D. 65-100)
Papias (A.D. 70-155)
Barnabus (A.D. 100)
Letter to Diognetus (A.D. 130)
Justin Martyr (A.D. 110-165)
It is possible but rather unlikely, that these early writers had actually written “baptizing them in my name” and that some unscrupulous Trinitarian(s) changed the words of every one of their writings to “baptizing them in the name of the Father, and of the Son, and of the Holy Spirit.”
So if Jesus did say the words, “baptizing them in the name of the Father, and of the Son, and of the Holy Spirit,” it indeed seems puzzling, that Jesus’ disciples would not have obeyed that command, but instead (in every instance recorded in the book of Acts) baptized people in Jesus’ name alone.