I love the wonderful processes defined in How to Talk So Kids Will Listen, and Listen So Kids Will Talk, by Faber and Mazlish. It's possible to empower children to make good choices for themselves, learn problem-solving skills, improve self-respect AND respect of others, all while nurturing the bond between parent and child.
We all hope our children will achieve the ability to think things through and make good, safe and healthy decisions for themselves. My own experience, and the advice of many child-development professionals, is that classical punishment is not likely get a child there; it leaves authority and consequences in the hands of parents or more powerful others.
What worked very well for my daughter, and is now working with my grandson, is to leave as much choice within their reach as possible. And let them experience as many consequences, both good and bad, as possible.
They will make mistakes (even adults do, right?). Mistakes are among the most important experiences in life, contributing toward learning self-management skills. My approach is to leave enough room to make small mistakes, a kind of learn-as-you-go approach. Kids learn by direct experience where the limits are, and what they need to do to be safe.
Punishment is mainly, as I get it, an "attention-getter." The point is to reinforce the importance of standing rules, or remind a child that they exist. Since this was apparently a "new" situation, what's most needed here is a discussion that your daughter gets to participate in. If you punish for a new rule that you choose AFTER a bad choice, that's like changing the rules after the game starts. Nobody considers that fair.
Of course, it's exasperating for parents that there's no way to anticipate every "exception" or unusual situation that might occur. Of course, your daughter "knew" cognitively that her choice was contrary to household rules, but emotionally, I'll bet relatively few pre-teens would have fessed up in that situation. They don't want to get sweet auntie in trouble, or give up the chance to eat candy at will.
Talk about complications! Put yourself in her shoes, and notice how confusing, and potentially delicious, that would be. And even if she turned the bag of candy over to you in the beginning, what would she say that wouldn't get her aunt in trouble? This woman who's on her side, at least on a sentimental level.
If you ask her WHY it's important not to keep secrets from parents, I'll bet she can actually give you an impressive list of reasons. She's heard your coaching for her whole life. Even if she seems to ignore you or roll her eyes when you speak up, she does that BECAUSE she's heard it all so many times.
But she may not have heard all the angles. the most important consideration as she matures into a young woman who will want increasing independence, is that she will really want and need your trust in her. And you might help her think through various situations, like what if you're with friends at the mall who decide to shoplift, or someone trying to convince you to try drugs or alcohol. (Although my observation/experience is that those situations are much clearer, and therefore much easier to make a good choice.)
By the way, I think cleaning her room is a logical consequence. But at 11, a top-to-bottom cleaning is above and beyond logical. She should thoroughly clean out, vacuum, and wipe down the area where she hid her booty.