Water baptism is a necessary part of being saved in accordance with the Scriptures. Mark 16:16 He that believeth and is baptized shall be saved; but he that believeth not shall be damned. Acts 2:38 Then Peter said unto them, Repent, and be baptized every one of you in the name of Jesus Christ for the remission of sins, and ye shall receive the gift of the Holy Ghost.
John the Baptist took the Laws of Jewish purity that were so well ingrained into the consciousness of the Jew and used it to take one’s life and elevate it to a higher plane. He specifically used the mikveh to wash away the sins of the unregenerate people. John knew that he was preparing the way for the Christ. In order to accomplish this he took the concept of niddut (being unclean and separated by sin) and using mikveh he elevated them from the unclean state to a state of kodesh (being holy or purified, separated as in consecrated).
Peter knew that Jesus commanded his disciples to baptize new converts as symbolic of Jesus’s burial. He also knew that those whom John the Baptist had baptized needed to be rebaptized in the name of Jesus Christ for Jesus Himself had commanded it as a part of the great commission.
Paul met new believers and rebaptized them in Acts 19. Acts 19:1 And it came to pass, that, while Apollos was at Corinth, Paul having passed through the upper coasts came to Ephesus: and finding certain disciples, 2 He said unto them, Have ye received the Holy Ghost since ye believed? And they said unto him, We have not so much as heard whether there be any Holy Ghost. 3 And he said unto them, Unto what then were ye baptized? And they said, Unto John’s baptism. 4 Then said Paul, John verily baptized with the baptism of repentance, saying unto the people, that they should believe on him which should come after him, that is, on Christ Jesus. 5 When they heard this, they were baptized in the name of the Lord Jesus.