The baptism was performed in the name of Jesus Christ alone. So one must then ask, why is there a contradiction?
Are you familiar with a concept called
ontological subordination?
In the Old Testament, we see God the Father as the predominant One doing this-and-that, with the other Two "in the background," so to speak, making cameo appearances.
At the beginning of the New Testament times, we see God the Son taking center stage, with the other Two "in the background."
When Christ's ministry on earth was done, He ascended into Heaven and God the Spirit took center stage.
He (God the Spirit) now has center stage until He goes up in the Rapture
* and the Son comes back and takes center stage for 1000 years.
After that, He will turn everything back over to the Father for the period of time we call
eternity future.
To answer your question, the Holy Ghost hadn't come yet, and being baptized in His name wasn't required.
Thus, ontological subordination teaches that ... if anything ... one should be baptized in the name of the Holy Ghost only.
HOWEVER, we are commanded today to baptize in the name of the Father, and of the Son, and of the Holy Ghost.
So even ontological subordination doesn't fully explain it, but it does shed light on how God does things.
Here's the short answer:
Jesus said to baptize in the name of the Father, Son, and Holy Ghost ... so we baptize in the name of the Father, Son, and Holy Ghost.
* 2 Thessalonians 2:7 For the mystery of iniquity doth already work: only he who now letteth will let, until he be taken out of the way.