A person must feel they have something to prove to another or want to gain their approval when bragging.
People who are content and happy with their own lives feel no need to try and make others feel less than in order to make themselves feel better.