We can only imagine how theatre began. It may have emerged partly as a means of communication, before language was very specific.
It was also used to explain phenomenon that could not be understood, much of which arose out of fear. For instance, dreamtime stories explain how and why nature works the way it does, and the stories of Zeus, or Thor, throwing shafts of lightning may have developed out of the need to give an understandable reason for a very frightening phenomenon.
Much of these phenomena gave rise to the invention of 'gods' which were little more than the spirits of earth, sky, sea and so on. The more complex the social structures of man, the more complex and various became the gods to explain and serve that society.The earliest men explained their world by means of gods of earth and sky, water, trees, the sun, the moon and so on. Later, men had townships, farms, went to war with each other, and so their inventions included gods of war, of the hearth, of the crops, and so on.
Much of the earliest performances arose out a desire to please a god or gods. Many of these early dramas were ritual in nature. So what is ritual? It is a series of actions, and/or words and sometimes music too always done in the same way. Words, actions and so on are repeated. Most rituals are associated with religion in some way, so there is an element of awe, of the celebration of a mystery. Often the doings of the gods could not be understood by early Man - why did a loved one die? why did a flood destroy all the crops? A ritual enactment of the event or a repetition of praises in hope of pleasing the gods to stop such a thing recurring, or to signify humble acceptance of their will, helps keep a sense of order and justice in a confusing world.
A student example of ritual performance