Throughout the gospels, but especially in the gospel of Mark, we have regular examples of Jesus admonishing both people and demons not to reveal to others who he truly was. This has puzzled many scholars and given rise to a number of explanations, including the idea that even Jesus was unaware of his full identity.
The author of this interpretation was German theologian Wilhelm Wrede, who wrote in the early twentieth century that the gospel of Mark was redacted to depict Jesus as trying to conceal his identity for very specific reasons. Among the early Christians, there was an apparent contradiction: on the one hand they had a tradition of a risen Lord, the Messiah for all humanity; on the other hand, there were traditions about Jesus and his earthly life which made no mention of his divine nature or mission.
How could the two be reconciled? The author of Mark hit upon the idea of having Jesus instruct his disciples, those he healed, and the demons he exorcised not to reveal his nature or identity to others. For Wrede (and many other theologians at the time), Jesus only saw himself as a Jewish prophet and everything else was added later by the early Christian church. The development of the messianic secret was thus an effort to harmonize the two conflicting traditions the true one about the real Jesus and the theological one developed by his followers after he was gone.
Today this particular interpretation is much less popular, but the problem of why Jesus would be depicted as counseling silence and secrecy remains. Its a complex issue because there are also plenty of examples where Jesus doesnt command silence and where its clear that a message about who he is and what he is doing is spreading among the people, well in advance of his crucifixion and resurrection.
One interpretation has been that passages showing Jesus revealing the truth of his teaching only to his inner circle either the disciples generally or a select group of disciples was part of an effort to enhance the status of the disciples or of their own closest associates. The appearance of such scenes in stories about Jesus life could have been used against early Christians claiming authority on their own despite never having personally met or learned from Jesus. After all, if they werent around to be introduced by Jesus himself to what he really meant, how can they claim any authority next to those who were?
Against this, however, we have the fact that the apostles never seem to be paying close attention to the secrets Jesus is initiating them into; when they are paying attention, they never quite grasp what is going on. As portrayed in Mark the disciples are generally a stupid, uncomprehending lot who dont appear to deserve the position they have been granted. If Mark has been trying to increase their stature and authority in the early Christian community, he seems to be going about it in a very odd manner.
On the other hand, it is also possible that Mark wished for his audience to identify with the disciples in some way. Being a very early Christian community where layers and layers of theological traditions had not yet been built up, it is not unreasonable to surmise that they may have experienced some difficulty coming to grips with a human being who was the Messiah and the Son of God not despite being crucified, but because of it. By depicting the disciples as also unable to comprehend all of this, Mark allows listeners to enter the story more fully.
Another interpretation has been that such scenes in the gospels are indicative of a very early Gnostic tradition within Christianity, possibly even dating right back to Jesus. Both Gnosticism and mystery religions are characterized by teachings that are presented in the form of metaphors, stories, and parables which have at least two meanings: a superficial meaning that is revealed to the public and a secret meaning that is delivered only to those who have advanced in the ranks of followers, achieving some specified status that demonstrates they are ready to handle the spiritual truth that lies behind the veil of matter.
Whatever the reasons, the traditions of Jesus admonishing others to keep things secret whether his identity, the nature of his mission, or the truth of his teachings are just as old as those which have Jesus making such things public. They are older than many of the theological layers of interpretation which have been inserted in the gospel texts, especially the later ones like Matthew and Luke.