Before it became a real play with actors and dialogue, ancient Greek plays were about appeasing gods and about songs that would please them and celebrate them. This was mostly done in the glory of Dionysus, but others were celebrated too. Eventually this developed into the standard comedy and tragedy thing.