This is the covenant aspect of baptism. The one who is baptized receives the benefit of the Messiah’s atonement through the ordinance of baptism; the act of receiving the benefit creates the covenant, which is to take upon oneself the name of Christ and to endure to the end. (See commentary accompanying 3 Nephi 12:48.)
In the ancient world, taking the name of Christ would have had significant implications that the modern world has forgotten. (See commentary accompanying Mosiah 5:8 and Moroni 4:3.) We are not to adopt just the name of Christ, but also the attitude and actions of a Christian.