Direct and Indirect Object Pronouns.
Juan da el pastel a Jaime.
Juan gives the cake to Jaime.
D.O. = the cake
I.O. = Jaime
Juan le lo da a Jaime.
Why is Jaime still included in the sentence? If 'le' is the pronoun replacing 'Jaime?'
2 Answers
Well, here is the way it was taught to me.
Juan gave the cake to Jaime. Juan da el pastel a Jaime. Juan se lo a Jaime.
When double (indirect and direct) object pronouns are used, the IOP precedes the DOP. The IOP's "le" and "les" change to "se" when they are used before a DOP that starts with "l", such as "lo" to avoid the tongue twister effect of "le lo".
Since "se" can have several meanings, it is common to clarify by adding something like "a el" or in this case, "a Jaime".
Spanish has a lot of repetition in its grammatical structure. Another example would be "No pasa nada," which is correct in Spanish, but whose double negative would be ungrammatical in English.
In the sentence you gave, which should read, "Juan se lo da a Jaime. the "a Jaime" is optional. It may be eliminated without changing the meaning of the sentence. Usually, when it's retained, it's for emphasis or clarification.