Make no mistake. Our salvation is based in the death and resurrection of Jesus Christ. It is offered to all, but it must be asked for. That appeal must be made with repentance and faith, but the question is how to ask for it.
There was a time when seekers in evangelical churches were asked to pray through to salvation, that is, pray until one got a feeling that one was saved. This did not work for everyone. Sometime in the latter part of the 1800's evangelists were praying with those who wanted to be saved. By the early 1900's the sinners prayer had been invented. Sinners were told that if they prayed this prayer in faith, they would be saved.
Those who promote the sinners prayer argue that baptism cannot be part of the response of asking for salvation because "baptism is a good work" and we are not saved by our own good works. The irony of this is that in religions around the world prayer is recognized as being a good work. This is true in Judaism. In Hindu and Buddhism it brings good karma. And in Islam it is one of the five pillars of the religion.
Baptism, on the other hand, is not something that one does, but is an action that one submits to. The work is done by the baptizer, not by the one being baptized. Unlike the sinners prayer, which is a mouth only action done by the one praying, baptism is a whole body passive activity. Just like one cannot save oneself, one cannot baptize oneself. And baptism, unlike the sinners prayer, is connected with the death and resurrection of Christ, the true grounds of our salvation (Romans 6:3-5).
Finally, rather than being less than 150 years old, baptism as an appeal for salvation goes all the way back to the apostles. The apostle Peter wrote, "Baptism, which corresponds to this, now saves you, not as a removal of dirt from the body but as an appeal to God for a good conscience, through the resurrection of Jesus Christ" (1 Peter 3:21 ESV).