"The elephants eat an apple."
Translation:Les éléphants mangent une pomme.
Only "le" and "la" contract to "l'" when followed by a vowel sound; "les" does not.
I guess a good way to think about it is that these contractions occur to make the language sound and flow better, avoiding the awkwardness of two consecutive two vowel sounds (same principle behind using "an" instead of "a"), and with "les," there is a different principle at play to help the language sound and flow better, which is the liaison.
I agree with you in principle about the reason for contractions and you are perfectly correct with the a/an analogy. However in "les elephants" you are repeating a vowel sound anyway "les" = 'lay' and "elephants" = 'aylay' so in this case it does not function to smooth the double vowel.
A comparison might be the way some people in English stubbornly write "an history" even though that makes no sense unless you have a Cockney accent.
Because the conjugation of manger for third person plural is mangent.
The verbs in French change according to the subject. This is called conjugation. It goes as "Je mange, Tu manges, Il/Elle/On mange, Nous mangeons, Vous mangez, Ils/Elles mangent". Here Les éléphants is third person plural so we use mangent.
On doit apprendre la conjugaison pour chaque verbe. Ne vous inquiétes pas! Il y a un motif.
The plural 3rd person (which is ils/elles = they) have -nt at the end (usually), while the singular 3rd person (which is il/elle = he/she/it) doesn’t.
« L’éléphant mange », « il mange », « il joue » (=he plays), « il aime » (he likes)
« Les éléphants mangent », « ils mangent », « ils jouent », « ils aiment ».
(Note that the -nt ending isn’t pronounced.)