It's really frustrating when you break a rule you didn't know existed in the first place. Let's examine how to fix those scenarios.
I despise unwritten rules.
An unwritten rule is any expected restriction on behavior or practice that is not explicitly stated in some manner.
I once worked in an office that had several rules. But I also ran into a few situations in which the rules were unwritten. And they are almost comical.
All of these are very real scenarios. And I still come across unwritten rules frequently. And I probably even have some of my own.
Unwritten rules are bad for one, sole reason -- no one knows they exist!
We probably all have some of our own and don't even realize it. I find the simplest approach to be to notice when something someone did (or didn't do) is frustrating you. Then, consider why they are doing (or not doing) that thing. If they say, "I didn't know I ..." you may just have an unwritten rule on your hands.
Side note: If you ask keep asking, "Why?" you're using a form of the 5 Whys, which can be a great way to solve problems. Follow this practice and you just might find the the root cause of your problem, and it might not be an unwritten rule.
Let's come up with an example that's probably come up in your life -- putting things away.
You finish your coffee or breakfast in the morning. For whatever your reason, you leave the dishes on the counter. Then you get yelled at for leaving your dishes on the counter.
What you need to ask yourself in these situations is whether or not you've had that conversation before. If you have, then you just screwed up, maybe you need to adjust the rule that is governing the yeller's anger. But if you haven't, then you have discovered a new unwritten rule, and something must be done.
When you discover an unwritten rule, talk it out. And think about scenarios in which the action can be allowed and not allowed. And when you consider potential solution, really think hard about what you will and won't be able to conform to. Using the dishes example, if for some reason putting dishes away in the way that yeller wants you to just doesn't work, explain why and propose an alternate solution.
Furthermore, although it's ridiculous in the case of putting dishes away, consider actually writing down the guideline that comes from the discussion. I know, it's not going to work for basic house rules, but especially when it comes to business, it can help.
For example, think about the facial hair scenario from above. What if that company wrote something like this into their dress code:
Men may be clean-shaven and they may wear a beard, mustache or goatee. Facial hair is considered established when it is 0.25" in length and, on average, 100 hairs per square inch. If a man decides to grow facial hair, he has 10 business days to convert from being clean-shaven. If he does not meet the criteria after 10 days, he must either become clean-shaven again, or he must use personal vacation to complete his facial hair growth.
That's absurd, right? But, as crazy as that scenario is, at least if they wrote it down and spelled it out explicitly, employees have no excuse for breaking the rule.
But, even if you write rules on paper, people are still going to come up with excuses. I suggest that if you have explicitly stated the rule, then there is no middle ground. Either your rule needs to be rewritten, or the rule-breaker should be punished (and the punishment should probably be stated with the rule).
But we're still human, right? We want freedom. It's nice.
Talking out silly things like which direction the cups go into the cupboard is a good conversation to have because it ensures all parties can be at peace when they look in the cupboard (seriously, the little things matter). But you don't need to write it down -- it's easy enough to remember.
And still, some things do need freedom and autonomy, especially in the workplace. Rules and guidelines are for making life easier, not harder. This is why whenever you decide to create a rule, make sure it benefits the collective whole.
Be straightforward with your expectations, but remain open-minded and be willing to adapt when your rules are stupid.