Here's why:
* Direct Object: The direct object is what is being given. In this case, it's "her collection of mystery novels."
* Indirect Object: The indirect object is the recipient of the direct object. In this case, the library is receiving the collection of mystery novels.
The sentence could be rephrased to make this clearer:
"Louisa gave her collection of mystery novels *to* the library."