The protagonist, for example, sits across the table from his wife and angrily tells her how he has just been fired from his job. This is dialog when his rant and her replies serve to reveal something about their relationship, but narration if it is included mainly to describe the firing. Each has a legitimate purpose in telling the tale. The fired man narrates his termination interview, for example, because his description of it differs from the actual event (which you have already shown the reader.)
Deus ex machina is an extreme form of misused narration, introducing a character (or any other plot device) for the sole purpose of explaining away a problem point of your story. The term originated with ancient Greek plays in which main characters, who were usually the gods, came onstage by means of some mechanism: a rope from above, or a platform from below—literally, producing a god from a machine.
In telling about his experiences as a "child actor," Kenneth Cummings wrote of the concept in his memoir, Meant To Be Here:
When I was in grade school, I was pulled into my sister's interest in acting, as was my brother. Half a lifetime later, I now believe it was because Mother could drop all three of us off at the local Antrim Playhouse for a few hours of free baby-sitting. I recall being in Alice in Wonderland, in which my sister was Alice; Love for Three Oranges. a fantasy opera by Serge Prokofiev; and Thurber's 13 Clocks, which had been written only a few years before we performed it.
Usually I was “mobile scenery.” I remember little more about the whole experience than Prokofiev’s music, and bits of the stories. For example, in 13 Clocks, there was a villain (the Duke) who was punished by the Devil for not doing enough evil, and one (the Golux) with an “indescribable hat” that became describable whenever he was depressed.
One otherwise-forgotten play (Three Oranges, I think) I recall only because it was the only performance in which I had lines to speak. I came onstage as “a chief,” very deus-ex-machina, to narrate away a plot problem. I stomped on, made a complex long statement, and stomped off. It couldn’t have been any more obvious if I had been lowered from the ceiling in a toga to speak my lines.
Prokofiev used an old fairy tale for his libretto, and took the tone from commedia dell'arte performances which commonly used stock characters that the audience was presumed already to know something about (King, Prince, Witch, Cook, and so on.)
Perhaps in this case, the narration was a deliberate choice, deus ex machina intentionally used as a satirical tool.