For example, why do we call the country of Japan "Japan" in English while its residents refer to their country as "Nihon," but at the same time we give many of the cities such as Tokyo the same name they would?
hi! This is a linguistics question; while there are a few linguists here, this question might do better (?) in /r/Linguistics, although I suspect you're finding a pattern that may not be there. In any case, both this sub and /r/Linguistics' have FAQ entries on country names:
/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?
and there have been a couple of recent posts on city names