The bases are as much to threaten the countries they are in as they are to protect them.
Nope. They are there because, after WW2, the U.S. led democratic countries realized they were better off setting up a stable international system where disputes weren’t constantly turning into wars. Japan and South Korea both rejected communism and joined the Western alliance. There is resentment about U.S. bases, but both countries are liberal democracies and neither country wants to leave the U.S. led system and take their chances with a Chinese led system. Donald Trump gave Japan and South Korea a perfect opportunity to kick the U.S. troops out. Neither country took that opportunity because they want those bases there.
That’s not to say that the U.S. is perfect, but if you think Iran, Saudi Arabia, China, Russia, North Korea, Venezuala, etc. are better, you are seriously deluded about the state of the world.