Some people seem to think all slang terms for cultural groups are automatically derogatory. A sizable proportion of people from the US get offended that people from Latin America call them “gringos” too (which is ridiculous IMO).
"Ami" isn't just any slang term, it is a politically loaded word. Besides being used as a common derogatory expression it was often used by the RAF[1] and their followers, especially in the slogan "Ami – go home!".
"Ami – go home!" is a popular enough slogan that it has it's own Wikipedia entry[1], unsurprisingly only in German and French.
[1] https://de.m.wikipedia.org/wiki/Ami_–_go_home!
EDIT: For some reason the link doesn't work on HN. Either copy and paste "https://de.m.wikipedia.org/wiki/Ami_–_go_home!" or use https://bit.ly/3CZXNxh