Some time ago I spent a lot of time in youth hostels. A pattern I noticed was that people from all different cultures were polite and considerate until the number of people in the immediate group whom they considered allies in some way crossed some threshold at which point they became jerks, disregarding rules and politeness and generally acting as though they were the only real people there. I was in Europe, so most of the large groups were also European, but I at least saw German, Spanish, and French groups behaving this way. I met many Australians, but they were always traveling singly or in pairs and always stayed polite as far as I could see. I also have a vivid memory of Americans on a train in southern Germany voicing their opinions loudly and rudely about homes they saw passing by outside the train windows. It was just three or four Americans, but the arrangement of people on the train gave them a local majority.
I suspect it is this dynamic more than tipping culture that gave rise to the stereotype of the ugly American. In small numbers people in foreign lands try to stay quiet and unseen. In larger numbers they feel safe and, maybe because they feel free from consequence or maybe as a stress reaction, they become worse than their normal selves. It isn't just Americans. But for a period in the last century Americans were the folks with sufficient money to show up in other people's countries in tour groups.
Also, the people who create the stereotype are the ones who are noticed. If there are lots of foreigners blending in and a group of them who don't, it's the ones who don't who create the reputation for the rest.