A striking number of venerable Irish surnames originated as Gaelic Irish designations of outsiders. The best known of these is "Walsh", with its variants "Walshe" and "Welsh". This last version precisely marks the bearers' place of origin, which is even more obvious in the Irish-language version. Wales is "Breatan", "Britain", and Breathnach translates as "from Britain". So the third most common Irish surname means simply "British". Talk about your cultural diversity.
It seems very unlikely that the Walshes chose the name themselves. More probably, it was given them by the locals as a way of marking them out as blow-ins.
Historical happenstance was one reason it happened. The original Walshes were part of the great wave of foot-soldiers, craftsmen and other army camp-followers who came after the Welsh-Norman invasion of the 11th century, just as the adoption of hereditary surnames in Ireland was just getting into its stride. Many of the names we still bear embody meanings frozen into position at that period. Those other camp-followers, the Flemings, for example, already knew very well that their forebears were from Flanders. It was the Gaels who turned the designation into a surname that singled them out as foreign.
Irish memories of blow-ins run deep, and finger-pointing did not start with the Normans. Many Irish names created centuries after the Viking defeat at Clontarf still identify their bearers as descended from Scandinavians. McLoughlin and O'Loughlin, meaning son and grandson of the Norseman ("Lochlann") are the most obvious, but there are many: McDowell and Doyle, from the root Dubhgall, the dark foreigner or Dane; Sugrue, Ó Siocrú, from the Norse first name Siegfrid; McManus, based on Magnus, one of the most popular Scandinavian given names; McAuliff, son of Olaf; McCotter from Oittir.
So on the evidence of surnames, as of so much else, Irishness is beautifully problematic. Give Ireland back to the Fir Bolg, as Paul McCartney should have sung.