Why do States obey international law?

It is very obvious to read remarks that international law lacks a number of features that would be considered key in any domestic legal system. Some of the features would include a proper system of courts with compulsory jurisdiction, a legislative organ that enacts law, and an administrative body that secures compliance with such law.  Also, the very nature of international law and the subject it covers makes it impossible for the system to have international equivalents to a police force or a system of prisons. And it is these missing elements in the system, which has led some to argue that international law isn't law at all but a system of niceties that originated in the courtesies that Kings once extended to one another.
A diversified view of this argument lies in the fact that the states, the subjects of international law, actually consider international law to be concrete law. It is worth mentioning that International lawyers do not talk in the language of morality or efficacy; they speak of breaches of legal obligations and rights enshrined in treaties or established through decades of State custom.  Certainly, this picture becomes more apparent when one considers that States feel the need to explain how and why their actions do not amount to breaches of customary international law. And it can be concluded that few (if any) States would be comfortable admitting that they have breached international law.[1]
We can cite many reasons for the obedience that States render to international law and one of the prime among them would mean efficacy. International law governs numerous aspects of international relations and includes wide topics from diplomatic immunity to the passage of ships on the high seas. After looking at the rules we find that, these rules provide established methods for undertaking certain activities and it is therefore easier to abide by them than to suffer the confusion that would entail if each State went its own way. Also, we must bear in mind the fact the States contribute towards making of international law and they often represent the most convenient way of getting things done.[2]
However, this doesn`t provide an exact answer as to why states obey international law when it is inconvenient for them to do so. This is explained if one considers the approbation and criticism that States suffer if they are seen to be in breach of international law. Primarily, in order to protect their reputation and to maintain their balance & status in the international community, States have to be seen as upholding the rule of law; otherwise they will suffer at the hands of other States.
Even this however does not explain why even powerful States so often obey international law when it is not in their interests to do so. a reason for this obedience lies in the common aims and ambitions of all States that international law represents.
However, even the powerful states obey international law to a great extent even when it is not in their interest to do the same. The possible answer lies in the fact that international law represents and lies in the common aims and ambitions of all states. Also, International law is seen by many States as setting standards that must be achieved for the good of all. The Universal Declaration of Human Rights and even the founding of the United Nations, and the League of Nations before it, all represent the collective aspiration of States and their citizens to strive for a better world. It is worth mentioning that policy considerations and interests often pull against this aspiration in the short term but it remains in place.

[1]Harold Hongju Koh, Yale Law School, Why Do Nations Obey International Law?, Yale Law School Legal Scholarship Repository, 1-1-1997