The events in a story ought
to flow naturally as the consequences of prior events and the actions of the characters. However, sometimes the writer has an end result in mind, but no natural way of getting there. The writer has to kludge the story a bit to make it go where he wants to.
In other words: something exists or happens for no reason other than that the plot requires it to. See also In Dex Machina
, which is more about clumsy ways of resolving plots as a whole and tying up loose ends.