Mikvah is associated with ritual purity.
Baptism is always associated with discipleship.
Israel was baptized into Moses's teachings.
John's baptism took disciples away from competing rabbis.
John considered Jesus's teachings to be superior to his own, requiring him to be baptised BY Jesus and to follow Him.
Paul was reluctant to baptize new believers because he thought it created division .
Why was the term baptism used to describe what the competing rabbis were doing?
Was it a case of using an equivalent Greek word to convey an existing Hebrew meaning? We know that Adonai, sarx, psyche, etc were used inspite of not being the exact equivalents. Or was it a word used to describe a new ritual or process.
Israel knew that they were still in exile, under judgment even though they were returned from Babylon. Jerusalem was under foreign rule, freedom to worship was controlled, the Temple had been desecrated several times. They searched the Scripture to discover what was needed to please God and be justified.
Each rabbi had a suite of laws they considered halakhic, required, for justification. Works of the law.
4QMMT and Paul: Justification, "Works" and Eschatology
The ‘works’ commended in MMT, then, are designed to mark out God’s true people present time , the time when the final fulfillment of Deuteronomy has begun but concluded. They are designed (C30) ‘so that you may rejoice words of ours to be true’. These extrabiblical commands will thus enable the sect to the verdict of the last day, when it will be clearly r a  the identity and context of the differentia of the in the is not yet at the end of time , finding these anticipate evealed that those who follow this particular halakhah are indeed the true, renewed people of God.
(3) This brings us to the key comparison between MMT and Paul. Paul, arguably, held a version of the same covenantal and eschatological scheme of thought as MMT; but, in his scheme, the place taken by ‘works of Torah’ in MMT was taken by ‘faith’. Paul, like MMT, believed (a) in a coming ‘last day’ when all would be revealed, and (b) that the verdict of that last day could be anticipated in the present when so meone displayed the appropriate marks of covenant membership. For him, though, the appropriate marks were not ‘works’, either of the biblical Torah or of postbiblical halakhah, but faith: more specifically, faith in the God who raised Jesus from the dead.
John taught the need to follow ALL the Law. Those who followed his teachings were inducted into his group by baptism. In 1st Century Palestine, the term baptism could have come from the word bapto or related words like baptizo. We have a 2nd Century BC document here containing both those words:
The clearest example that shows the meaning of baptizo is a text from the Greek poet and physician Nicander, who lived about 200 B.C. It is a recipe for making pickles and is helpful because it uses both words. Nicander says that in order to make a pickle, the vegetable should first be 'dipped' (bapto) into boiling water and then 'baptised' (baptizo) in the vinegar solution. Both verbs concern the immersing of vegetables in a solution. But the first is temporary. The second, the act of baptising the vegetable, produces a permanent change. When used in the New Testament, this word more often refers to our union and identification with Christ than to our water baptism. e.g. Mark 16:16. 'He that believes and is baptised shall be saved'. Christ is saying that mere intellectual assent is not enough. There must be a union with him, a real change, like the vegetable to the pickle! Bible Study Magazine, James Montgomery Boice, May 1989. Translated Words KJV (80)
1 Peter 3:21-22 NET And this prefigured baptism, which now saves you – not the washing off of physical dirt but the pledge of a good conscience to God – through the resurrection of Jesus Christ, who went into heaven and is at the right hand of God with angels and authorities and powers subject to him.
In the NT, is baptism a ritual for induction to a course of indoctrination or the indoctrination itself. The answer is: both.
Induction brings one into the church. Indoctrination saves.
Israel was baptized into Moses (God's People/ecclesia) drank from the Rock (Christ) did not believe, resisted indoctrination, rebelled, perished.