Contemporary psychiatric research notes that anxiety and fear are related emotions, and both relate to action. Fear stimulates avoidance and escape, but when these or any actions are blocked or thwarted, fear turns into anxiety. At the core, all emotions presuppose certain kinds of knowledge. In fear, this knowledge is an awareness of danger.
After Jesus’ resurrection, they might be sought by these same authorities for alleged complicity in stealing the corpse (Mt 28:13) and spreading a lie. A third source of fear is reported in the Gospel of Peter (26): a widespread search for the disciples was instituted on the grounds that they were malefactors and had attempted to burn the Temple.
Fear on these or any similar grounds would certainly account for the highly irregular action of “locking the doors.” Middle Eastern culture does not recognize or respect privacy. While the interior of a house is sacred to the family, the place where the women are protected and kept secure, children have the culturally recognized right of wandering in and out of every home to spy on what other families are doing and report this back to their own families.
In group-oriented societies like that of our ancestors in the faith, every group suspects that all other groups are plotting evil against it. The only way to protect one’s group is to keep informed about what other groups are up to. Young children serve this purpose, which is why Jesus forbade his disciples to keep the youngsters away from him. Jesus wanted everyone to know that he had nothing to hide.
The reason why the disciples locked the door is chiefly because they wanted to hide themselves! Not that others did not know where they were or could not easily find them. Their action (locking doors = avoidance) was prompted by fear.
Typically in the Bible, when a supernatural being encounters a human being, the supernatural being assures the human of its good will. Words like “do not be afraid” (Lk 1:13, 30; 2:10; Mt 28:5, 10; etc.) set the human being at ease and dispel the fear.
The Hebrew word for “peace” is very rich and has at least eight different meanings. David asks his general, Joab, literally about “the peace of Joab, the peace of the people, and the peace of the war” (2 Sam 11:7). When Jesus says to his frightened disciples, “Peace to you,” he declares a factual reality. His resurrection has gained unshakable peace for them; hence it is inappropriate to translate his statement as a wish: “[May] peace be to [or with] you.” Jesus is not wishing them peace; he declares with firm assurance that they possess it, hence they should discard all fear.
And indeed they do. Their new knowledge immediately replaces the old perceptions that stirred fear and anxiety. As the risen Lord commissions them to receive new members into the community, they recognize a new beginning and not an end for those who believe in him.