I think this is a hard situation, because as a mom and an almost stepmom I can see both sides. As a mom, I would want to send along a goodie bag with my dd to her class, especially if I wasn't going to be there. I think that my kids would probably be nagging me about it forever, probably even asking if I could especially put candy in it (even if I wasn't supposed to). I don't think my stepkids would be that specific with me, but as a mom, I would automatically want to prepare something for their class. If someone else did it, I have to admit my gut reaction would be to feel like my territory was being encroached on and want to do the treat my own way. However, in these situations, especially as a stepmom, we do have to stand back and pick our battles sometimes.
In fact, I was in a similar situation as the mom, it sounds like. I had bought dss some shirts to wear to school when I was out shopping for all the boys. I gave them to dp's sister (who watches the boys before school and has all their school clothes, we can think of her as the "mom" in this situation since they have no bio mom). Apparently, the shirts were too big, in her opinion, so instead of telling me so I could exchange them, she put them away and told dss that he could wear them next year. Three months later, I found this out and felt a bit hurt and confused for several reasons. A: I felt that she assumed I would not be able to just go swap the item myself. B. I felt that she was being passive agressive because I encroached on her job of buying and dressing the children. C. I felt like maybe she didn't like me or was scared of me, because why is it so hard to just say - oh the shirts were too big - can you take them bag and get a smaller size? It was silly. In the end, I let it go, because really it's not a big deal. It's an example of how miscommunications can cause assumptions and hurt feelings, though.
OP, I think you did the right thing by letting it slide. If someone swapped out my goodie bag, I would be really hurt, even if I did it wrong and it was well intentioned. On the flip side, I could totally see myself doing the same thing you did.
It's complicated, huh.