When we visit other cultures, we bump up against unwritten rules, as well as the written rules that people don't actually obey. We tend not to notice these things about our own culture, because we have absorbed them so well, until someone who's unfamiliar with them asks. (Or until we're watching an episode of Curb Your Enthusiasm, which points out and questions many of our unwritten social rules.)
imagine this makes writing historical books a challenge, because
finding an edict or a code of law or an etiquette book from the period
still doesn't tell us what people were actually doing. There are rules
that everyone routinely violates; there are rules that certain members
of society can violate freely but that others cannot; and there are
rules to which people give lip service while doing the opposite.
I were building my own fictional world, I would think about this aspect
of it. Do the characters live in a world where rules are willingly
followed, or where they're followed but only reluctantly and just
because they're strictly enforced, or where the rules are just for show?
What exceptions do they have? What are the unwritten rules? In their
society, who sets the rules? Who breaks the rules, and why?