In the Gospel of Matthew, Christ tells his disciples they are the light of the world. He adds:
"A city that is set on a hill cannot be hidden (5:14)."
Just as a lamp is not hidden beneath a basket but put on a stand to spread light through a house, so we ought to do the same (5:16): "Let your light so shine before men, that they may see your good works..."
But in the very next chapter, he exhorts them to perform righteous acts only in secret:
"Take heed that ye do not your alms before men, to be seen of them: otherwise ye have no reward of your Father which is in heaven (6:1)."
Not only charity but prayer and fasting also must be done in secret. It is the hypocrites, pagans, and Pharisees who do such things publicly.
The contradiction is obvious, but never acknowledged——let alone resolved——in the text. The text is clear that it has something to do with whether righteous acts are performed for the glory of God, or for the glory of men. But it still leaves a glaring question unanswered: How does one become a "light of the world" if one keeps secret every righteous act?
The solution is the city. It is the city that is publicly visible, not necessarily the actions of individuals that aggregate into a city.
Christ seems to be invoking a short term, a medium term, and a long term. The hypocrites practice righteousness purely for the short term, to be seen and celebrated by other people. But in the long term, they will not be rewarded, for they have already claimed all of their reward in advance. For those who perform righteousness in secret, it's as if their reward grows, with interest, over time. They receive no glory among men in the short term, but they receive their reward only at the end of the long term, in Heaven, having accumulated maximum interest.
Between the short-term gain of hypocrites and the long-term reward of the faithful, the city on a hill (1, 2, 3) emerges as the medium-term waystation for those on the long-term path.
Those who perform their righteousness in secret inevitably produce fruits that can be observed in public. Their way of life cannot help but become a public phenomenon, even if the righteousness of each individual is illegible. Because their action is truly righteous, even if it is not apparent to men, it is nonetheless set on a hill, so it cannot be hidden. A city is not an instrumental project of do-gooders hoping to attract followers. It is the social aspect of the vertically ascending tendency in all virtuosic performance conducted for its own sake——i.e., for the glory of God.
Righteous action is not a public display of morality, but a costly training. The cultivation of virtuosity is private and its ultimate reward distant, but its fruits are inevitably public and attractive.
The straight and narrow path is a tight-rope.