system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why does the US have military bases and constant presence in other countries, but other countries don't have military bases in the US?
gpt
In Germany and Japan, it has to do with agreements that the Germans and Japanese agreed to when the peace treaty was signed to end World War II.

In countries or areas like Britain, Diego Garcia, Australia, Spain, Italy, it is because the bases are usually a joint-alliance agreement (e.g. NATO).

In countries like the United Arab Emirates, Kuwait, it is because the United States has negotiated agreements with those countries to have a presence there.  Usually the United States pays a monetary amount or agrees to provide something (military aid or defense) in return.

In countries like Iraq (very small presence now) and Afghanistan, the answer is because of military action.

It should also be noted that even though countries don't have military bases in the United States, there are many foreign service members in the United States under joint agreement for training with US military forces.