This is a great question, but please allow me to provide some background first in order to answer this question.
First, there are two "sacraments" in view: baptism and the bread & cup. Paul indicates that the Israelites coming from Egypt were "baptized" and subsequently ate the manna (bread) and spiritual drink (cup). However, they did not enter the Promised Land notwithstanding that they had been "sacramentalized" believers (that is, they had partaken of both baptism and the bread & cup). Paul is therefore drawing an analogy to the Hebrew Bible that sacraments do not save, and that believers therefore should not assume or take their faith for granted (1 Cor 10:12).
Secondly, when these Israelites first left Egypt, they in fact believed on the Lord (Ex 14:31). This verb in Hebrew is the same verb in Hebrew used of Abraham, who was justified by faith. So these Israelites had believed by faith, were subsequently baptized into Moses in the cloud and sea (meaning that both the Lord and water had comprised the elements of the "baptism"), and even received the manna (bread) and spiritual drink (cup) from the Lord... but when that faith was tested, their hearts were hardened by their own unbelief (Heb 3:19). That is, they had fallen away from faith (Heb 4:11) and were therefore denied entrance into the Promised Land.
So what was the baptism into Moses?
The Israelites were able to leave Egypt because of Moses, who was the mediator between the Lord and the Israelites (Gal 3:19-20). In other words, were it not for Moses not a single one of them would have escaped Egypt. Therefore their escape is tied to Moses, and accordingly they were associated, or identified with him. They got out of Egypt because Moses got out of Egypt.
To tie the ideas together, the baptism of Moses provides the escape from the slavery of Egypt. In a parallel fashion, the Moses of the Christian New Testament provides escape from the slavery of sin. Please click here to compare and contrast the parallels. The escape through the Red Sea is parallel to the resurrection, which is the escape from sin and death by "the Prophet" (Acts 3:19-26), who is the second Moses within the Christian New Testament.
The only difference however is that the baptism "into Moses" had to be complemented by the baptism "into the Lord" when they finally entered the Promised Land. That is, when the Israelites entered the Promised Land, it was not Joshua leading the Israelites (successor of Moses), but the Lord himself. The ark of the covenant was therefore the agent of baptism into the Promised Land for the Israelites; therefore these Israelites entered the Lord's rest. When their faith had been tested in the wilderness, they had responded positively...
In summary, in the Christian New Testament, the believer on Jesus is akin to the one escaping the power of sin and death (like the Israelites who escaped Egypt). However, subsequent to that time of faith, testing of that faith will ensue in the wilderness of life. If the faith takes root (compare to Matthew 13:1-23) that believer is saved and enters the Promised Land where more giants await. However, if that faith takes no root, the seed of faith perishes and the "believer" does not enter the Promised Land notwithstanding that such a person had been "sacramentalized." It is very interesting that the discussion of the seeds taking or not taking root (Matthew 13:1-23) is followed immediately by discussion of tares among the wheat! (Matthew 13:24-30)
Finally, of keen interest and note, when the Israelites in fact finally entered the Promised Land, they finally partook of the sign ("sacrament") of circumcision at Gilgal according to Joshua 5:5-6. In other words, they were circumcised after crossing into the Promised Land, and not before. Thus faith (and its testing) alone is the overriding factor for justification -- that is, the so-called "sacrament" is complementary to faith, but had no more intrinsic power to save than the baptism into Moses or the manna (bread) and spiritual drink (cup), for whom all the Israelites at that time were also circumcised (but were not saved). The word "Gilgal" in Hebrew (rolling away) means that circumcision at Gilgal was the Hebrew Bible equivalent of baptism, since according to Joshua 5:7-9 circumcision "rolls away" the reproach of Egypt (sin and slavery). In other words, the stones from the Jordan River (site of baptism "into the Lord") were rolled to Gilgal as a commemoration of their circumcision, which "rolled away" their shame of Egypt.