This is an interesting explanation of the whole The god from the machine thing...
In some ancient Greek drama, an apparently insoluble crisis was solved by the intervention of a god, often brought on stage by an elaborate piece of equipment. This "god from the machine" was literally a deus ex machina.
Few modern works feature deities suspended by wires from the ceiling, but the term deus ex machina is still used for cases where an author uses some improbable (and often clumsy) plot device to work his or her way out of a difficult situation. When the cavalry comes charging over the hill or when the impoverished hero is relieved by an unexpected inheritance, it's often called a deus ex machina.
I think it applies to the movie in that Donnie is in a tough situation and he only gets out of it by a car driving up...Kinda crazy
I'm too lazy to make a sig at the moment