When a new dispensation of Christ’s gospel occurs, re-baptism is required. The Jews were practicing baptism before John the Baptist. But first John, then Christ taught that re-baptism was necessary to accept God’s new work.
This is from the New Covenants, Matthew 4:10:
Then said the Pharisees unto him, Why will you not receive us with our baptism, seeing we keep the whole law? But Jesus said unto them, You keep not the law. If you had kept the law, you would have received me, for I am he that gave the law. I do not receive you with your baptism because it profits you nothing, for when that which is new has come, the old is about to be put away; for no man puts a piece of new cloth on an old garment, for that which is put in to fill it up takes from the garment, and the rent is made worse. Neither do men put new wine into old bottles, else the bottles break, and the wine runs out, and the bottles perish. But they put new wine into new bottles and both are preserved.
Joseph Smith’s edit of the passage makes it clear the topic that led to the new cloth-old garment, new wine-old bottles comparison by Christ was re-baptism.
Part of what the Pharisees had difficulty accepting was that the structure established by Moses was in place and being conducted in a regular manner. They “keep the whole law” in contrast to what John and Christ were doing. The Pharisees had a High Priest, Levite priests, a functioning temple, regularly established ordinances, set feast days, and a large willing population to follow their system of worship.
By contrast what John and Christ offered seemed like a one-off side-show. Without a replacement structure having a visible magisterium set into imposing structures, who wore holy garb, Christ’s re-baptism looked homely by comparison. Christ had only a rag-tag body of followers without any visible means of sustaining itself. At the time what Christ supported seemed to be so intangible it would fly to pieces as soon as they killed Him. All He offered was a body of teachings and baptism. It would only be at the end when He would add bread and wine to remember His sacrifice. So they killed Him to end the foolishness. But the body of teachings proved so enduring, penetrating so deeply into the heart of the faithful, that it has endured and grown across two millennia.
The Pharisees failed to recognize that every new dispensation had been and would be organized according to the circumstances of the people and the work to be accomplished. To show they were humble enough to repent and follow God’s new direction they were required to be re-baptized, although they had already undergone an approved and apparently authoritative ordinance set in place by Moses.
Nothing changes in God’s work. The test has been and always will be identical in every generation.