English grammar: had been... past perfect question?

Littlebroken

New member
I'm not sure when to use the past perfect tense.

I saw this sentence online: He awoke thinking he was in a prison and that he'd been arrested for robbery. He then realized that it had all been a bad dream.

I kind of understand the first instance of past perfect (...he'd been arrested for robbery). But I don't get why the second one (He then realized that it had all been a bad dream" is used. Can't you just say, "He then realized it was all a bad dream" ? The simple past sounds like it could be used in that sentence.

Can you please explain the grammar here? Thank you:)
 
Back
Top