There's a distinction between adopting officially a particular version of a name that's been there already, maybe in different versions, like Sri Lanka (formerly referred to as Ceylon), and coming up with a brand new name for a country that didn't exist before, like the USA.
Or the United Kingdom, which a lot of people count as a country.
In ex-colonial states the tendency has been to search for a name with some historical roots, such as Ghana to replace the Gold Coast.