US probably never was
"the good guy" and just acted on its own interests, but that's not the point. People believed that it's true. Or probably just internalized that as a part of a "country stereotype", like how Germans are hard-working and brits are polite. So it was OK and sometimes even expected for the US to scold the evildoers.
Now that changed, at least in my social circle, and US being moralistic is seen as hypocrisy.
Now that changed, at least in my social circle, and US being moralistic is seen as hypocrisy.