There are several places in the book of Acts that the Bible says people were baptized in the name of Jesus. And so today, during baptism ceremonies, those words are spoken in order to follow Biblical principles.
Peter said to them, "Repent, and each of you be baptized in the name of Jesus Christ for the forgiveness of your sins; and you will receive the gift of the Holy Spirit. (Acts 2:38)
But when they believed Philip preaching the good news about the kingdom of God and the name of Jesus Christ, they were being baptized, men and women alike. (Acts 8:12)
Now when the apostles in Jerusalem heard that Samaria had received the word of God, they sent them Peter and John, who came down and prayed for them that they might receive the Holy Spirit. For He had not yet fallen upon any of them; they had simply been baptized in the name of the Lord Jesus. (Acts 8:14-16)
"Surely no one can refuse the water for these to be baptized who have received the Holy Spirit just as we did, can he?" And he ordered them to be baptized in the name of Jesus Christ. Then they asked him to stay on for a few days. (Acts 10:47-48)
Yet in chapter 28 of Matthew (in the great commission) the Bible says people were to be baptized in the name of the Father, Son and Holy Spirit. And some speak these words today during the ceremony, partly because it sounds more authoritative and partly because it covers both cases (just in case God might consider one to be better than the other).
Go therefore and make disciples of all the nations, baptizing them in the name of the Father and the Son and the Holy Spirit, teaching them to observe all that I commanded you; and lo, I am with you always, even to the end of the age." (Matthew 28:19-20)
In each of these passages –in Acts and in Matthew 28– the people who heard the words "be baptized in the name of ..." were Jews. They were leaving behind their old system of following the Law to be acceptable to God. The Law included temple worship, offerings and sacrifices and standards for living. Although that system seemed to provide a way for them to attain God's forgiveness and acceptance. Actually, it was only a shadow of what was coming. The reality was Christ Jesus.
Whether these Jews said His name alone or as part of the Trinity, it didn't matter. By being baptized in the name of "the Christ Jesus", they were confessing (agreeing) that Jesus was the Messiah –equal with the Father –God among them in human form. In so doing, they were making it their last ceremonial washing because they were renouncing their own legalistic efforts and accept His final and complete washing!