"-던" may imply a temporal interruption in whatever action or process in question. In all the aforementioned examples, their respective "-던" clause either precedes and introduces or describes a rupture in time, an interruption of some sort or just an event that happens unexpectedly, counterintuitively, etc.
"그러던" by itself in your given example implies first, how things were going normally, predictable and second (thanks to "-던",) introduces a rather sudden, unexpected interruption or just new information that has not been mentioned. Could you clarify what is confusing you in particular?
Thank you! It's something of a complex concept, which is not intuitive and hard to describe. I have found this: Lesson 27: Using ~던/었던 to Describe Past Tense (the section Describe Past Tense with ~던 and ~았/었던), which is an attempt. I guess, I need to see more examples to make it sink but I like the challenge.
I have come across another usage of "-던" in a language app (Beelinguapp). The Snow White story (part 2):
"누가 내 잔에 있던 와인을 마셨나?" 다섯 번째 난쟁이가 말했다.
“Who has been drinking from my glass?” The fifth dwarf said.