An unwritten rule in Iran is a custom called taarof, which, in simple terms, means you should politely refuse an offer at least once or twice before accepting it. I'm a thirty-six-year-old architect living in Isfahan, and it's so natural to me that I only really noticed it when I explained it to foreign friends.
People follow it almost everywhere. If you're a guest and your host offers you tea or fruit, you're expected to say no at first, and the host is expected to insist. In shops, a taxi driver or shopkeeper might even say, 'It's nothing, be my guest,' when you try to pay. Of course, they do expect payment, so you insist too, and after a little polite back-and-forth, you pay.
If someone breaks the rule, it can be quite awkward. A guest who accepts immediately might seem a bit greedy or rude, especially to older people. On the other hand, a host who doesn't insist might seem cold or ungenerous. Foreigners often get confused, and I've seen a tourist walk away from a taxi without paying because he believed the driver, which was very embarrassing for both of them.
I think people follow it because it's about showing respect and modesty. By refusing, you show you aren't trying to take advantage of someone's kindness, and by insisting, the other person shows their generosity. It protects everyone's dignity. Honestly, it can be tiring, and younger people in big cities are relaxing it a little, especially with close friends. But in formal situations and with elders, it's still very strong, and I think it reflects how much we value politeness.