Ridiculed for buying strangers kids things

So I was in dollar tree last night, buying work books and flash cards for the children I nanny. Well a family walks in with 3 elementary age kids. I heard from a few isles away the kids asking if they could get somethings and they got horribly screamed at by the mom saying "no we dont have enough money for everyone to get something". Two of the kids had came into the workbook and writing isle and were looking through the work and coloring books, and I felt bad because you could tell they really wanted it. So I took a stroll around the store to get a good look at the mom to see what she was purchasing, because if you go to dollar tree and don't have the money to buy your kids one thing then you must be there to get necessities. No. She was buying a ton of candles, glass beads, sodas, ice cream bars, makeup, and nail polish. I could tell she was just being selfish and blowing her money on crap she didn't need. I felt bad that those kids were so well behaved and were just asking for books. They weren't asking for candy or toys. So I bought some extra books and crayons and waited outside for them. I knew that if they said no I could give them to my niece and nephew. When they came out I mentioned that I overheard her saying they didn't have a lot of money and that I saw that the two boys really wanted some coloring and works books, so bought some extras and wanted to know if they would like to have them. The dad just kind of looked at me and I could see the mom about to boil over. She went off, basically saying I was trying to show off that I have money, which I dont, I get paid 175 a week. Besides, it was only about 5 dollars worth of stuff. She was calling me a stupid white bitch, and saying I was trying to ruin her kids. I tried explaining that her kids were so much more behaved than the other kids I see in dollar tree and I thought they deserved a treat. Well she goes on and on about me being a white bitch (mind you her children were half white). She eventually gave up when she saw I had no interest in arguing over something so idiotic and she walked away with the kids. I could tell the dad wanted to take the bag I was still offering, but I think he knew she wouldn't let the them have it.

I honestly was not judging them for not having money, I was judging them for buying 10 candles but their kids couldn't even have one book to share. I really just wanted to be nice. I love kids, that why I am a Nanny. I have suffered from 5 miscarriages in 3 years and kind of lost hope for us. It hurts that mean hearted people like that woman get to have children no problem. I know that's wrong of me to think but it's how I feel.

I know now I should've asked before buying it. But was I wrong? I wasn't trying to spoil her kids I just felt bad. Let me know.