Under the assumption that success and failure reveals something about your skill, you are right.
Under the assumption that success or failure are basically independent of innate skill and the only thing that determines one's ability is number and length of prior attempts (experience), bragging with failures can make sense. The message is not "I have failed four times", it's "I have tried four times (failed, but that's almost secondary)".