Christians also shouldn't practice their faith for the adulation of others. (Matthew 6:1-6)
If a guy got baptized for the sake of enjoying how much others view him as some "super spiritual" person, that would be wrong. That would be worshiping the image of self.
But to use the occasion to make a statement about Jesus Christ in the hope that their faith is encouraged or that their soul is saved, is quite right.