It is a simple fact that the world contains many countries with whom we have to have dealings but with whom we disagree on many important questions. The Saudis, for example, might very well object to the disgusting way in which women can drive cars here and cast votes, but they have to put up with it because they need to sell us their oil and buy our armaments. Such are the compromises they find themselves forced to make. Diplomacy is the means by which those compromises are made.
It enables communication between different countries whose systems and habits would otherwise be incompatible. The fact that we are talking to another country does not mean that we like them, merely that we have to talk to them. The methods of diplomacy keep them at arms length.
A similar concept applies with computers. There are file formats like ASCII and Postscript that are not particularly practical in themselves but which enable files to be taken from one computer to another or from a computer to a printer. Diplomacy is like that: not very good, but sometimes useful.