The thing is that most of humankind lived in small tribes or villages, everyone knew everyone's business and privacy practically didn't exist. The anonymity of city life is relatively recent and has often been used to further social behavior that wasn't acceptable, like secret affairs or criminal activity.
When everyone you know lives in a really small area, a lot of stuff is apparent by inference and can't really be hidden. This ends up de facto reining in behavior without anyone necessarily telling you to stop.
To be clear, I'm not trying to justify a surveillance state. I'm just commenting on the irony of people acting like anonymity is some long-standing norm in human society. It's really not. It's relatively new and relatively uncommon.