While there is no "job" of a country, it is natural that each one will work for its own best interest and any moves it makes in the global world is due to their own vested interests in some way including helping Haiti, France helpong Us and the world supporting Ukraine.
Why would a country act against its interest or just randomly? Alliances and corporation are a part of politics