I've recently discovered that Latin s at the end of words became the palatal approximant j in Italian. I remember reading that this process is also observed in some Occitan dialects,so it cannot be some sort of anomaly. Considering that these sounds are, at least to my ears, phonetically extremely distinct, how is this possible? Is there some explanation involving auditory perception that would clarify the reason behind this change?
I don't know enough phonetics to give the details, but there seem to be at least some pronunciations of a voiceless sibilant coronal fricative that are phonetically similar to [j].
"A gestural solution for some glide epenthesis problems", by Eleonora Cavalcante Albano, says that epenthesis of [j] before coda /s/ in Brazilian Portuguese can be attributed to gestural overlap. It may be relevant that Portuguese /s/ is supposed to have [ʃ] as a coda allophone. On page 1787, there seem to be a suggestion for why the glide would be front: "Articulatorily, the front glide could arise from a passive movement of the tongue body as the tongue tip moves slowly to achieve the critical constriction for [s]." There is also a more technical argument on that page that I don't understand at all.
Another paper that seems relevant: "The relationship between coronal place and vowel backness", by Edward Flemming, 2003.
There is some further discussion in Consonant Structure and Prevocalization, by Natalie Operstein, p. 156, but I haven't been able to view all of the relevant section. Operstein says on p. 155 that [ç] has been postulated as a possible intermediate stage between [s] and [j].