It just seems very odd to me that the English would've decided to make up our own word for the other countries instead of calling them what they call themselves.
Much of this is simply adapting foreign words to familiar English phonemes and orthography. In the case of "España" and "Spain," they both derive from the Latin "Hispania." They exhibit the standard transformation in Latin words beginning with s-blends. Latin "statio" gives us English "station" and Spanish "estacion;" "specialis" became "special" and "especial." This is the effect of the separate linguistic communities using the same word over time.
A more dramatic instance is that of Beijing. Several Latinizations of Chinese have been used over thee years, each with its own conventions. Chinese is a tonal language; English has no concept of vowel tones. That makes it terribly difficult to use even the original sound of the place name. We can't expect people to write "北京," nor can we expect English speakers to replicate the name well. Thus, we get English versions like "Beijing" and the antiquate "Peking." Likewise, Germanic English words are prone to vowel clusters; these are difficult to reproduce in the syllabic, mostly consonant-vowel structures of many Asian languages. Try writing "Pennsylvania" or "Vermont" with a phonetic syllabary rather than an alphabet, where every consonant is followed by a vowel.
More disconnected cases (Germany vs. Duetschland) are a case by case situation, which you could ask about individually here or look up older questions on.
hi! it's actually a pretty short hop from España to Spain - just phase out the unstressed syllables - but in general differing names are a common feature of all(?) languages. This question is pretty common both here and in /r/Linguistics, especially asking about Germany, since it has an interesting variety of names in different languages
/r/AskHistorians FAQ: Why do countries have different names in other languages?
/r/Linguistics FAQ: Why are our names for countries so different from what the people call their own country?
a couple of recentish posts
Why is Hungary called Hungary when Hungary is made up of Magyars?
How did Japan end up calling itself by China's name for the country: "Land of the Rising Sun"?
and a couple on the same question for city names