It's not even like the military or three-letter agencies that can claim to be serving their own country, it's just a for-profit enterprise that will serve any government that hires them.
Palantir does only work with "Western-aligned" governments, so this isn't quite true.
> Palantir Technologies CEO Alex Karp says that employees unhappy with the company’s mission—or its dealings with Western governments and militaries—should leave. > > “We want people who want to be on the side of the West, making the West a better society,” Karp said on Wednesday at an event for the World Economic Forum, continuing that Palantir “may not be your cup of tea.”
https://fortune.com/2023/01/19/palantir-ceo-alex-karp-world-...
"Western-aligned" isn't completely up to the company to define, but it sure is a completely flexible term. Whether a country like Saudi Arabia or Turkey is "Western-aligned" seems open to interpretation and changes with the geopolitical winds.