Hi Patrick! Good question!
To begin with, let's clarify one thing: as you probably know, LO and LA can be:
1. Definite articles: L'amica di Marco è simpatico / L'amico di Marco è simpatico.
2. Personal pronouns, as in the examples that you reported.
1. When they're definite articles, elision is compulsory.
2. When they're personal pronouns, elision is predominant but not compulsory. Sometimes we can avoid the elision for "expressive reasons". As in your example: "chi ve lo ha detto? ce lo ha detto la signora" ---> I'm probably angry because that thing was a secret, so I stress "LO" .
Also, some grammarians suggest not to use the elision with personal pronouns when it can generate ambiguity. Es. "L'aiuto" ---> I help HER or HIM? Only use the elision when the object of the sentence is made clear by the context (maybe because was mentionedat some point earlier in the conversation). But, as I said, cases of personal pronouns LO and LAwith no elision are a minority, but still correct.