It is the Gyges ring parable.
A man find a ring that makes him invisible (total privacy). And then he does steal, introduce himself in houses and watch women undress and rape them ... and then he becomes a bloody tyran.
The moral of the story is invisibility/privacy makes people bad because moral behaviour is a result of the look of the other on your actions.
Needless to say Plato was an asshole. So is conclusions was to create the Republic where the wise would be hidden from the masses, control the masses, censor them ...
Greek myths however said you could evade from the look of the other but not the one of your own conscience and that the chtonian gods (Eryhnies & al) would come and get you.
I think that people are mostly having a conscience, but that the lack of transparency favors the one having none (psychopaths) and that psychopaths are attracted to power like pedophile are attracted to teaching kids.
Thus, I am puzzled that knowing this we let the more powerful have the most privacy. Hence my fight for the transparency of the most powerful persons, the exact opposite of today's law. As a result, I think privacy is actually a bad thing.
It doesn't matter if someone is observing you, like Panopticon, or there is nobody observing you.
Your actions are dictated by your personal ethics; morality is simply the framework society overlays on top of that, dictating what is acceptable or not.
One's ethics may either be aligned or maligned with society's morals, it has nothing to do with being observed or not.
The Greek chthonics were basically the judicial branch of the pantheon. So justice, even for the most secret of misdeeds, was inescapable, because all mortals eventually die.
- Thanatos is the concept of Death.
- Chthonics are characterized by their association with the earth.
> Chthonic (UK /ˈkθɒnɪk/, US /ˈθɒnɪk/ from Greek χθόνιος khthonios [kʰtʰónios], "in, under, or beneath the earth", from χθών khthōn "earth") literally means "subterranean".
(wikipedia: Chthonic)
Wikipedia's "Chthonic [Greek] Deities" sidebar lists the following: Demeter (I mentioned her in my comment too); the Erinyes (or Furies); Gaia; Hades; Hecate; Iacchus; Melinoe; Persephone; Triptolemus; and Trophonius. This is not a list of gods related to justice, or thematically connected to justice. It is a list of gods thematically connected to (or, in the case of Gaia, being) the earth. (Hecate is noted in the article on chthonic deities as not receiving chthonic sacrifices, but as being categorized as such in the modern day because of her connection to the underworld.)
I didn't mean to imply that justice was the only function of the underworld gods, but the reward and punishment of deceased souls is a common theme across many religions.
When an Egyptian soul entered Duat, those with guilty souls--as determined by Anubis and a set of scales--were devoured by Ammit. A Hindu soul's karma--Buddhists inherited the tradition--is judged by Yama, and may be consigned to an unfortunate reincarnation, or even Naraka (or Diyu), the Hindu Hell. Abrahamics are judged after death, and the good enter paradise while the wicked are tortured by fire in Gehenna or by ice in Zamhareer. Maya traversed Xibalba, and its painful, terrifying, and humiliating tests.
Since no one can escape death, a mythical afterlife where punishment is meted out for misdeeds done in life, or rewards granted to the virtuous, is a great way to keep the living in line, especially if their moral development still revolves around not getting caught. If someone believes that death is their final end, and there is no afterlife, it is much more difficult to convince them to adopt unselfish strategies (or those vulnerable to exploitation) while they still live.
I hate to keep bringing up Demeter, but I'm going to have to. The god of agriculture is chthonic. The earth itself, encompassing everything, is chthonic.
I'm not aware of a Greek principle of being judged in the afterlife; there are myths of specific people who received particular punishments, but I thought they were conceived of as exceptional. Do you know of any source stating that, according to the classical Greeks, the general run of bad people receive a worse fate in the afterlife than good people do?
Achilles' ghost appears in the Odyssey to say how terrible it is to be dead - he was a hero.
If you read the Iliad, you ought to know that Achilles wasn't exactly a paragon of virtue, even by the standards of ancient Greece.
But the general run of bad people were simply ignored and forgotten. You had to be a real shitheel to get a special punishment in Tartarus.