The term 'deus ex machina' was first used in the theater. Its modern day equivalent would be 'special effects.' Literally though, the term means 'the god from the machine.'
When the old sea God Poseidon, for instance, needed to make a spectacular entrance during the final act of a play, clever machinery work would allow him to rise through the floors of the stage or descend from the rafters.
Hence, 'deus ex machina', which, these days, has come to mean (with thanks to Wikipedia) any "artificial, or improbable character, device, or event introduced suddenly in a work of fiction or drama to resolve a situation or untangle a plot."
All human stories, of course, are filled with Gods and monsters. Held against the halogen light of reason their entrances and actions seem to be both artificial and improbable. However, humans always have just the one foot in the rational world. The other one will forever and firmly be stuck in the unclosed door which leads to the cave where we once lived - and where we return when our waking minds rest.
There, lit by a single fire, the paintings on the wall will leap and dance. There, from a deep, deep well, all our stories and all of our dreams rise up. These images, together with our genes and our daily experiences, shape us: make us human.
Karl Jung called them archetypes, but Gods & monsters will do as well.
They are like ghosts, and yes, ghosts do indeed exist. Ghosts are, quite simply, the blueprints of all our desires, of all the words and thoughts that become flesh and steel. Gods and monsters (or ghosts) are the cradle and the consequence of all those images, painted on the walls of the human heart.
We are made and informed by them, and they appear to us at times, like that old, theatrical deus ex machina. We may not clearly understand the machinery: how, from where or even why they come to us exactly. However, we ignore them at our peril. Like our dreams and our stories, our Gods & monsters (or ghosts) are always trying to talk to us.
Without these voices we would be like soulless, if rational animals or like any clever gadget: improbably pointless and artificial.
We are, after all, to paraphrase Prospero, such stuff as dreams are made on; and our little lives are crowded with these ghosts.