We don't know when theatre began, but we believe that the beginnings of it arise with myth.
Myths are often explanatory.
They explain a phenomena which can't be understood or explained otherwise. This is the beginning of metaphor. Sometimes these are enactments which become stories. In Egypt they had a number of myths we are aware of as early as 2500 BCE One which was performed was the story of Isis and Osiris which we call the Abydos Passion Play. He succeeded his father and married Isis his sister.