Competition was not even on my DD radar until she was 8 - in fact she spent a year on the team training old lv 5 while telling me she didn't think she'd ever want to compete. Then she helped at a meet. Then some of the older girls in her group were getting ready to compete - and suddenly she was driven to join them - to the point that her coach let her compete while scratching bars for 3 meets until her kip was solid....and she LOVED it! She didn't even ribbon (4-10th place ) in anything that year until state (placed somewhere in there on beam...) 6 months later. She loved being part of the team, getting hair done, going out there and watching her scores improve with each month and putting all the hard work into place.
We are lucky that for both of the gyms my kids are part of, kids get to compete even if they won't "win"...and frankly, for DD over the years she's gone from the above, to the top scorer on her team most of this year and too many (real) medals to hang up....DSs also have "moved" up in performance and skill, with DS the oldest now learning a new skill a practice (double back in the pit yesterday...). Had they been at gyms that didn't compete they probably wouldn't have stuck with it through the hard times when skills aren't coming...and missed out on huge amounts of team bonding, encouraging each other, healthy competition, the idea of personal improvement as well as getting over the disappointing performance...
So that's why competing is good for the kids - for the gym? Well, If you win its an advertisement. If you show up at meets with well prepared athletes who cheer each other on, love their coaches, have good attitudes, etc - even without "winning" - well that's a good "advertisement" as well. Kids generally like to compete - and having a goal for them to work to helps a gym as well. It needs to be balanced with the cost of competing and keeping "winning" from being the goal, in my opinion, because for some kids its just not in the cards, and for others (like my 2 oldest) it may take a few years to get there and they have to be encouraged on that road...