There's a big difference between a story that contains politics and a story that is politics.

Stories containing politics can absolutely be good. Game of Thrones is the obvious example, where most of the story is about the manoeuvring between the various factions. The key is that the politics is something that happens in the setting.

The problems start when you get a story that is a piece of politics, ie it's written in part or in whole as a piece of social/political advocacy. These tend to be pretty annoying if you don't share the author's opinions, and their overall quality also tends to be bad, since the events in the story are specifically chosen to prove the author correct. They also tend to steer away from hard questions or ambiguous morals (like the ones you get in, you know, real life).