Don’t go to companies with corporate politics. If you’re going to such a company (where politics are important, like Amazon) you must participate: you cannot protect yourself from them.
Any company develops corporate politics. Corporate politics stems from the corporation ultimately being a non-human entity that doesn't really have desires and needs, while its individual humans do have them.
At some point what's "good for the company" will not align with what certain (powerful) individuals want or need.