My 3 year old and I have these conversations occasionally. I have ill family members, and my son already attended 11 wakes in his short life. Death is as real as life, and this truth should not be hidden. If it is hidden, children will see it as either a shameful or scary thing. Plus, we are fooling ourselves if we think our 3 and 4 year olds will be shielded from this until they are "mature enough to handle it". I personally believe that it's better to talk about it now than never have the chance.
The kids at the daycare were exposed to the death concept the moment the little classmate talked about it or cried in front of the group. I can't believe that the teacher would voluntarily say, "Gather 'round, little ones, let's talk about how your mommy and daddy are going to die one day!" The teacher likely realized that the group of kids was talking and possibly getting upset about the loss of their classmate's pet. It's possible that the teacher tried to explain things in a simple, truthful way in order to calm the group.
Your response and personal feelings about death and loss may be the key to your daughter either fretting about it until it becomes a reality one day or realizing that death happens and is okay. Make eye contact with her when you talk about it, hold her on your lap and soothe her when you tell her that everyone dies one day. Acknowledge that it is a sad thing for people, and that's why it is important to give lots of hugs and kisses now (and read books together, go to the park, all the fun things that make life happy!) One thing I pointedly say to my son is "I always want to come home and hug you!" Also, I explained that, even if Daddy and I got sick or something, he will not be left alone, that either Auntie so-and-so or Uncle so-and-so would be there. This seemed to go a long way in calming his fears.
In quiet moments, I fear that I will die or my spouse will die. I allow myself these emotional outlets because I have to be gentle, trustworthy and positive when my son and I talk about it. I trust that I am doing what I can to prepare my son for that loss, if it comes sooner than I want for him. Having a will, designating a guardian and setting aside funds for his future help calm me, too.
Hope you can find peace and extend it to your daughter.