Bragging is not a good thing. Mostly, I guess, because it’s annoying to listen to.
But we all do it from time to time. And it makes us accomplish incredibly things, because we tend to carry around our pride with us everywhere. If we said something aloud, we better do it.
So bragging is not all bad.
The assumption is that something (like bragging) didn’t serve a purpose it wouldn’t exist. But bragging makes a lot of sense, if you consider it a way for us to push ourselves out of our comfort zone.
Bragging is one end of a continuum where the other end is being humble. Like someone can boast too much, they can be too modest (especially, I think, if they work in sales).
Most of us are somewhere in the middle. Some days we brag a bit, some days we play the humble.