Baptism was an Old Testament ritual (John the Baptist was a Jew) that got carried over into the early church age.
The ritual continued until some finally were shown that the Church age has replaced water baptism with Spirit baptism.
Peter was very Jewish. He kept kosher all his life and was careful to follow the Law.
After the Baptism of the Holy Spirit was sprung upon them?
Peter kept thinking like a Jew would for quite some time.
He still commanded water baptism, as he had performed while as a disciple of Jesus before the Cross took place
Peter had to unlearn about water baptism and concerning the mandatory eating kosher.
For Peter, it was like someone who had always driven with a stick, is given a car with an automatic transmission.
Peter kept going for the clutch as he always had done, but it was no longer there!
Here is where Peter was told by God to stop eating only kosher foods.
Acts 10:11-15
He saw heaven opened and something like a large sheet being let down to earth by
its four corners. It contained all kinds of four-footed animals, as well as reptiles and birds.
Then a voice told him, “Get up, Peter. Kill and eat.”
“Surely not, Lord!” Peter replied. “I have never eaten anything impure or unclean.”
The voice spoke to him a second time, “Do not call anything impure that God has made clean.”
Peter was at first highly resistant to eating what he was always taught as a Jew was religtiously "unclean."
The same kind of revolutionary change took place concerning water baptism.
To be replaced by the baptism of the Spirit.
The church age was a revolutionary change and new learning curve for the Jewish apostles.
Gentiles today reading the Bible simply want to do what it says without realizing the mistakes they made.
Mistakes that needed to be corrected as the apostle learned more and more about the New Way in Christ.
grace and peace ...........