You say this like it's a bad thing. You should be making your boss, your team, and your teammates look good. If you are doing those things, you are probably also making the company look good.
It's thinking about the long vs. short term. Focusing only on your own optics may work okay in the short term, but they cap out fairly quickly.
Think about how it looks from the outside. Employee A is only focused on themselves. It is recognized that A is good, but any team A is on still struggles. Employee B makes the whole team look good. It becomes recognized that B not only does well, but any team B ends up on does well. Who do you think advances the farthest long term?
I certainly don't think it's a bad thing to make your teammates look good, but in general it's more effective to give the lion's share of the credit to the boss rather than them. And credit is a limited resource.
I say that like it's a bad thing because it kind of is.
I believe there are some companies where coworkers rather than management decide promotions and this tactic would not work but they are few and far between.
This also has nothing to do with a just world fallacy. This is thinking long term. Rarely can someone politic all the way to the top. In order to lead, you need the support of your team. You get that by being a great team member yourself.
/rant
Finally, I'm tired of hearing how awesome people are, but their team sucks or their boss sucks (doubly so for people working at FAANG, because the low bar is so much higher). If they are so awesome, then get out there and help the team improve. Instead it's I'm so smart, but everyone is holding me back. I'm stuck on a crappy team, etc... Grow up.
/rant over
It's a mistake to think that it's not a zero sum game.
If there are 5 people and one available spot for promotion, you can get selected by bolstering your appearance or by tearing the other 4 down. Either one works.
And yeah, the best tactic is usually "make my boss look good".