You don't leave the country when you have tens of thousands of military troops still on land with major military equipment stationed there. The US never left Japan and certainly never left Germany.
Given what it costs to station troops outside the country (including an aircraft carrier with its air wing), there has to be a strong reason to keep them there for 70+ years. And it's not because we needed to maintain an occupying force [0] - it was to have bases with pre-positioned equipment near likely foes where troops could be quickly sent and move-out.
The REFORGER exercises [1] went on for nearly 30 years, testing the ability to rapidly move troops to Germany in the event of a Soviet attack. Not only was this expensive in monetary terms, it was expensive in human lives - each year people died from various causes associated with being around heavy equipment. Such as sleeping under vehicles that would roll over them in the night. Or crossing rail lines with their antenna still up and getting electrocuted.
The US didn't do this for any imperial reasons. It was to keep commitments made to those governments in the post-war years.
[0] Disclaimers: Dad crossed into Germany at the Remagen bridge before it fell, and I was stationed in Germany during the Cold War.
I'm not even claiming that. The US has clear strategic reasons to be positioned in many places around the world (like at Okinawa, for example). And Japanese people, despite wanting these troops out, are not going to see them leave anytime soon. So Japan has about no say in it.
> The US never left Japan and certainly never left Germany.
It left the the running of their governments. The US military is/was not needed to keep order and prevent a collapse of civil society in either of those two countries. Contra Afghanistan.
You don't leave the country when you have tens of thousands of military troops still on land with major military equipment stationed there. The US never left Japan and certainly never left Germany.