The consequence for following a rule is a privilege. When misbehavior is minor, we can usually stay calm. It's big or frequent mistakes that cause upset and lost patience. We may punish instead of teach about responsible behavior. Often, children don't clearly understand that it's their behavior that has caused the punishment.
Children learn to avoid punishment and to fear their parents anger.
In this case, the punishment has not helped the child learn about self control and following rules. Help children learn that it is their behavior which controls consequences, both good and bad. Give privileges for being responsible about following rules. Take away privileges when the child isn't responsible and doesn't follow the rules. The rule - Mary picks up her toys.