Acts 19:1-7 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, 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. And he said unto them, unto what then were ye baptized? And they said, Unto John's baptism. 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. When they heard this, they were baptized in the name of the Lord Jesus. And when Paul had laid his hands upon them, the Holy Ghost came on them; and they spake with tongues, and prophesied. And all the men were about twelve.
Why did these people at Ephesus need baptism? They were baptized "unto John's baptism". A number of ideas have been posited -- because they had not received the Holy Spirit; they "were not saved"; that John's baptism was not "Christian baptism", and perhaps others. I think these are untenable, though I am not sure I can offer an alternate explanation.
The first two are usually tied together in the minds of folks that hold the idea. They did not have the Holy Spirit, so therefore they had not been born again, saved, regenerated, or whatever terminology they use to refer to faith in Christ through believing the Gospel. For example: "Rebaptism in the New Testament seemingly occurred only when a group of people never had received the Holy Spirit, who is the seal of salvation. Although the dozen people had John's baptism, they were then properly baptized as they trusted in Jesus and received the promised Holy Spirit." But this interpretation creates a problem with the Samaritan believers' experience (see Acts 8:5-17). The believers in Samaria were baptized, then afterwards the Apostles came to Samaria and laid their hands on them, and they received (same as Acts 19) the Holy Ghost. They WERE NOT "re"baptized. Compare the similarities of Acts 8:14-17 and Acts 19:6. If the absence of the manifestation of the Holy Spirit invalidated the baptism of these Ephesians, why not the Samaritans? Consider also that these Ephesians are plainly called "disciples" and "believers".
Something lacking in John's baptism is another main reason given for these folks needing to be baptized. Apparently a number of the Anabaptists so believed. The Easton Illustrated Dictionary states, "John's Baptism was not Christian baptism...those whom John baptized were rebaptized by Paul." But consider: (1). John's authority was from heaven. Compare Matthew 21:25-27 and John 1:6. (2). John the Baptist preached the Holy Ghost (of whom they professed they had not heard). Compare v. 2 & Matthew 3:11. (3). John required evidence of repentance (Matt. 3:8), and no one can experience it without the influence and work of the Holy Ghost. (4). Their answer (v. 3 "Unto John's baptism"; eis to Ioannou baptisma) implies that they were not actually baptized by John, but perhaps by someone following his teachings. (5). Apollos, a disciple of John ("knowing only the baptism of John", Acts 18:25,26) was not "re"baptized. He only needed further instruction, which he received from Aquilla and Priscilla.
If not these, then what? I would like to follow the interpretation of John Gill, who wrote, "...these are the words of the Apostle Paul, giving an account of John's baptism, and of the success of his ministry, showing, that his baptism was administered in the name of the Lord Jesus..." In other words, in verse 5, Luke is still recording what Paul is saying about people being baptized by John, rather than stating that the Ephesians were baptized. If Gill is correct, no actual baptisms occur in the Acts 19:1-7 pericope. Just discussion of John's baptism. As I said, I would like to follow Gill -- seems to wrap up and cut off any further questions about "re"baptism. I just can't see it fitting the sentence structure and context.
That leaves me with only one other option of which I can think -- these disciples in Ephesus had been baptized by someone who had heard John preach the Messiah and then picked up an incomplete message and ran with it. This person would have been unauthorized to adminster John's baptism. This is similar to the position laid out by Elder David Pyle, "...those people were rebaptized. This was done notwithstanding the fact that those people were sincere in their convictions when they were first baptized, and notwithstanding the fact that the Bible considered them to be believers when they were first baptized." I certainly hate to hang theology out on many supposes, but I've not been given a better answer.