"Esta mujer le dio leche a su bebé."
Translation:This woman gave milk to her baby.
What is the function of "le" in this sentence? Does it have to be there because it's a transitive verb?
"le" is the indirect object pronoun for "baby" It needs to be there. "a su bebe" clarifies its meaning.
I don't understand. "her baby" is not a pronoun so why in spanish do we use one?
The "le dio" is needed to indicate to whom she gave the milk. Spanish grammar does not follow the same rules as English grammar. You are looking at that sentence and thinking that by English grammar that 'le' is redundant, but in Spanish it is needed. Leaving it out sounds wrong, like baby talk.
Is this the case whenever we have an indirect object? What is the specific case and rule that allows me to recognise when this is needed?
To the best of my knowledge (limited as it is) the answer is yes, an indirect object always uses a pronoun. The extra clause with the direct object is added to clarify meaning when the referent is unspecified and there might be confusion.