It happens. You learn as you go, even for people who have been vegan for a while, there can be incidents where they eat something a friend offers or when they were out and about that they thought was vegan, later to find out it had whey, milk or eggs in it.
A friend of mine - a young and relatively new vegan - bought bulk merchandise at a Costco, things like pasta, pasta sauce, quinoa, etc....and she also picked up a case of canned refried beans. I guess no one ever told her or she neglected to look, but there are "vegetarian" refried beans for a reason (the traditional kind don't contain dairy but do have traces of lard). She got about halfway through the case before she noticed that she bought the traditional kind and stopped eating them.
I recently ate a friends tortilla chips with salsa, which I thought just had spices on them, only later to find out they also had some kind of whey powder involved.
Veganism shouldn't be about "personal purity" or "hands clean" so much as it should be about doing one's best to eliminate animal products from one's life. It can make you feel uncomfortable or dirty to know you just ate gelatin or milk, but surely in most products where you can't tell they are literally trace amounts. If there were significant amounts of animal products in a food, you can usually see or smell it (like a cheese danish or yellow egg noodles).
Plus, just think that there are homeless vegans or poor vegans who go to food banks, who try to end up with beans, rices, cereals, peanut butters, soups and veggies - but they may end up with a loaf of bread to feed themselves or their children that has whey in it. Are they supposed to throw out the loaf of bread when they're living in poverty and were given this item by charity?
Do your best. If you buy something with animal products in it, just don't buy it again next time. If it's gross enough (like my friend and her pig fat incident) just stop eating it and give the rest to a food bank or church if there's closed sealed portions left.
Is anyone really more than 99% vegan?