Warning: Game of Thrones spoilers ahead, so proceed with caution.
Loyalty is a funny thing on Game of Thrones. We've seen loyalties shift time and time again, with former allies and even families turning against one another while former enemies unite against a common foe. It's rare to find a character whose loyalty is clear throughout, and yet there's at least one character who has never wavered. Varys, the seemingly sycophantic eunuch and advisor, has advised many characters throughout the series, but his real loyalty has always been to the concept of "the realm."
It's a vague idea, as Tyrion Lannister points out when Varys talks to him. In some ways, "the realm" is just a collective way of referring to the entirety of the known kingdoms. More specifically, though, it's implied that "the realm" isn't just some geographical borders or really uncomfortable throne — it's the people themselves who make up the kingdoms. The realm stretches beyond any one kingdom (or even seven) or any one ruler or dynasty: it's the ongoing existence of the people of the land. As an abstract concept, it's something that stretches beyond specific borders or eras. That's why Varys is able to work with (or for) different factions as the war goes on: his allegiance shifts to those he believes will do the best for the realm, not those who he believes will benefit him personally.
Varys bringing this up makes an interesting point. Although some of the main players have noble intentions, most of the characters are fighting or playing the game for their own reasons: because they believe the throne is their birthright, because they believe they deserve to rule by sheer right of force, because they want to defend themselves and their families, and so on. Few, if any, have expressed genuine motivations to simply do right by the realm and its people as a whole. As the ongoing battle nears its conclusion, it's possible that the "good of the realm" may finally enter the equation. Perhaps it will motivate previously passive characters to tackle new challenges, or perhaps someone will act selflessly rather than selfishly. Whether or not doing things for "the good of the realm" will actually be considered, we'll have to see!