YABU her friends were not rude at all . your daughter told them they could and they did, it wasn't their fault as they took your daughters word for it and probably thought that you wouldn't mind in the slightest.
You shouldn't of shouted at her friends, yes ask politely what they were up to but to have a full blown melt down is wrong. The girls probably were shocked by your reaction.
Growing up we were skint but when friends were over they were always fed and watered as was I when I went to their houses.
One of my friends mum only said we could help our self to stuff in the fridge because it was going out of date but if she had just food in we weren't allowed to touch it. If we were to eat at their house we could just share a meal but that would mean their child would go hungry as they would share the meal with us so obviously it felt horrible so no one would have anything.
One time they went mad for taking 1 bag of crisps for a friend of her daughter's she grabbed them off her and shouted at her saying that there not feeding the whole street. I was taken aback as it's a nice thing for the child to do especially if they have been given snacks at the other childs house.
I think, what it was this parent loved to buy all the expensive brand foods as they thought It was better so would try and make it last rather than buy cheaper alternatives once they were gone they were gone.
In our house if something is gone it's no biggy you just have something else till you can afford to get more. Surely there was other stuff in your house they could have if the bagels cheese and ham had gone this one time as it has only happened this once.
I'm sure by the way you reacted your daughter won't make the same mistake again.
I can't do enough for my child's friends when they come round they can have what they like, if I found them in the cupboards or making a sandwich id be wondering why they hadn't ate and tell them to help themselves. Even if they had used up everything.
I would hate to be the parent everyone is scared of when going to their friends house incase they do something the parent didn't like and get bollocked for stuff.
This day and age though I find that most parents are even more generous. I've witnessed after school a few parents bring bags of crisps ice lollies cakes etc and share then out with all the kids at the park. Sometimes even offering my children some. And they each have a handful of children themselves and are by far from well off.
Maybe have a box with a few cheap bits in for when your dd has friends round in future. Then everyone is happy all round.