I believe you are asking, if baptism in an essential part of salvation, then what about the thief on the cross? He didn't have to be baptized to be saved, so why do I?
The answer is: While Jesus Christ walked the earth as a man, He acted in a manner befitting His sovereignty as the Lord of heaven and earth. He determined who would be granted healing or deliverance or salvation on whatever basis He deemed appropriate at that particular time, for that particular person. Keep in mind that Jesus' primary purpose was not to save as many people as He possibly could, but to teach and establish principles that others could learn and follow, thus making possible the salvation of many more even after He had departed. Therefore, the healings and salvations described in the Gospels were recorded primarily to teach principles concerning salvation, not to serve as examples of New Testament salvation.
Furthermore, Jesus came to inaugurate, not to demonstrate, the New Testament, which He said at the Last Supper was in His blood (Luke 22:20). One aspect of the New Testament He came to establish was water baptism in His name. Clearly this is why He told His disciples after His resurrection to go into all the world and preach the gospel to every creature. He then stated, “He who believes and is baptized will be saved” (Mark 16:16). The New Testament plan was that after His departure, He would forgive sins based upon each person's response to the gospel message. The response necessary for salvation included both believing and being baptized. Therefore, we understand that baptism was exclusively a New Testament requirement.
But what about the thief on the cross? Why didn't he have to be baptized. Obviously it was because he was saved before the New Testament went into effect, for Hebrews 9:16-17 says, “Where there is a testament, there must also of necessity be the death of the testator. For a testament is in force after men are dead, since it has no power at all while the testator lives.”
It is evident that Jesus Christ is the testator of the New Testament, so let me pose this: Was Jesus still alive when He said to the thief, “Assuredly, I say to you, today you will be with Me in Paradise”? Unquestionably He was still alive. Therefore, we must conclude that the New Testament was not yet in force and baptism in water for the forgiveness of sins was not as yet binding upon all men. It is not until three verses later that the Bible records, “He breathed His last” and died (Luke 23:46). Only after the testator had died and the last of His blood had been shed was the New Testament officially inaugurated.
One final point: Since the New Testament was established in the blood of Jesus, and since He told His disciples that they should preach “forgiveness of sins in His name,” it only follows that the New Testament baptism He establish is to be in His name as well (Luke 24:47). This explains why Peter told the people in Jerusalem that they should be “baptized in the name of Jesus Christ for the remission [or forgiveness] of sin” (Acts 2:38).
Furthermore, when Paul met some disciples of John the Baptist and asked them how they had been baptized, he explained to them, “John indeed baptized with a baptism of repentance, saying to the people that they should believe on Him who would come after him, that is, on Christ Jesus” (Acts 19:4). When they heard this, they did not argue and say, “We have already been baptized once. We don’t see why we need to be baptized again.” No. The Bible simply records, “When they heard this, they were baptized in the name of the Lord Jesus” (Acts 19:5).
To those who are looking for a reason not to be baptized in the lovely and wondrous name of Jesus Christ for the forgiveness of sins, I say, why resist the obvious and indisputable teaching of the Bible? Instead, come to the Lord repenting and believing, and be baptized, washing away your sins in the only name under heaven given among men whereby we must be saved; for it is in Jesus Christ that all the treasures of wisdom and knowledge are hidden and you are complete in Him.