The thief on the cross and Zacchaeus still lived under the old law, when baptism wasn't required. The new law wasn't put in place until Jesus had died and rose from the dead. What about verses like Mark 16:16? "He who believes and is baptized shall be saved." That seems to be saying that baptism comes before salvation.