In the Melian Dialogue, the Athenians tell the Melians that "the strong do what they have the power to do, and the weak accept they have to accept." How can we argue that this is compatible with morality and justice?
To make this argument, we have to say that the first duty of a state is to protect its own people and its own interests.
The Athenian perspective in this quote puts the interests of Athens first. It is based on the idea that Athens will do whatever it needs to do to protect itself. The Athenians have power. They are willing to use that power to do what is best for their own citizens. They do not care if that harms people from places like Melos because those people are not Athenians.
In international relations, realists argue that the duty of a state is to protect itself (and, thereby, its people). If we agree with this assumption, then anything it does to achieve this is by definition moral and just.