The purpose of keeping parts of the source langue no-translated, or using some variant or dialect of the target language for some elements (eg: dialog, a specific character talk, ...), depends on the work, its creators (author, translator), and the languages involved. But, here is some general reasons and uses that I can think of:
The original text, is based on a cultural reference that doesn't have an equivalent in the destination language
the text represent a title. or an honorific (cf. Japanese honorifics)
it's a location name.
it is a maxim a motto, or a proverb.
e.g: "Carpe Diem", "Unus pro omnibus, omnes pro uno", or:
“...L’amour fait les égalités, et ne les cherche pas."
-- The Red and the Black, Stendhal (Henri Beyle), translated by Charles Tergie
it hold a mythological, spiritual, or religious meaning
e.g: "chants" and "prayer", are rarely translated.
the text is constituted of poem verses, it is a poetic prose, or it sound way more elegant in its source language.
e.g:
‘Vous qui pleurez un passé plein de charmes, Et qui traînez des jours
infortunés, Tous vos malheurs se verront terminés, Quand à Dieu seul
vous offrirez vos larmes, Vous qui pleurez!’
-- The-Three-Musketeers
the original text is in a variant of the source language other than the standard one,
e.g: countryside language or a spoken unofficial language.
the author or translator opted for this trope:
Bilingual Bonus: A hidden message in a foreign language. This ostensibly makes these
messages available only to bilingual and international audiences. The
extra can be anything from a plot-relevant point to additional
dialogue to a random gag.
-- tvtropes