This response assumes the child does not understand the victim's point of view and ignores any other possible reason for the child's actions.
Instead, I would recommend a discussion with your kid in the format of Dr. Ross Green's Plan B method for debugging problematic behavior.
Would my behavior towards my child have the desired result?
If the desired result is for your child to not take other people's things, then modeling that undesirable behavior is unlikely to achieve that. It's possible they end up learning the exact opposite message. Because you're demonstrating that it's okay for you to take their things (since you did it despite knowing how they would feel), they may learn they can ignore how their victim will feel and do it anyway.
This method does not teach empathy but instead reinforces the idea that a victim is powerless. This can be dangerous because a child may decide that feeling powerless sucks and would rather continue being on the other side of the dynamic, e.g., continuing down the path of becoming a bully in order to avoid feeling powerless.
are there any reasons not to do this?
Yes. Children learn by what they see, but they also may act impulsively as children may not have yet developed impulse control (and in the case of neurological conditions like ADHD, it may develop much later or require medical intervention to manage it).
An alternative reason for the child's behavior could be as simple as they were hungry and the chips were there.
By modeling only the behavior you want them to mimic, you teach them how to handle themselves in similar situations.
By not figuring out what the real cause for the theft was and assuming it was for nefarious purposes, the child may internalize that they are bad and deserve bad things happening to them for seemingly no reason. They may also receive the message that @Arno pointed out and that, "my parents are sometimes cruel to me" which could undermine your position as their safe/comfort person. If this is a go-to parental response, then this could damage your relationship with the child where they don't feel safe coming to you with important things due to fear of you possibly responding in a cruel manner, regardless of the lesson you're trying to teach.