Japanese, the language that has an entire sub-alphabet dedicated to segregating gaijin words - lest they somehow taint the original language.
The reason borrowed words are written in katakana is too provide a clue that the word may have a non-standard pronunciation.
It functions similarly to how italicization does in English
Among many other stylistic uses, katakana are often used for native onomatopoeia and are used to write native words all the time (usually in cases where the kanji is either not well-known or to give a different feeling to the sentence -- ズルい is a good example of this).
This is largely similar.