The "en" in this sentence refers to the collections of eggs, of which she gives four to Ann. It does not refer to "à Anne". And even then you couldn't replace "à Anne" by "y" because Anne is a person and "y" shouldn't be used to refer to persons.