Its pretty simple. The correlation between “hates you” and you currently having, or recently having had, your army in that country, or having your army pretty publicly planning to visit that country, is pretty strong. Germans actually didn’t like Canadians much for a good while. But when the Canadian army was finally withdrawn from Germany (much to the US’s displeasure at the time), it only took about a decade for the Germans not to hate Canadians any more.
Since the US has pretty much been steadily adding to the number of countries its military is in or visiting, and never decreasing that number, well the outcome is predictable. You can manifest destiny, arsenal of democracy, leader of the free world all you want, but as long as your army is in another country, its a pretty good bet that country won’t like you.