Sam found a spell in Golden Time that he used to bring back Eileen. We find out three episodes later in The Trap that the spell was planted by Chuck so that he could give Sam something to lose to make him lose hope, to completely break his spirit.
Dean and Castiel go on a wild goose chase to Purgatory the same episode, looking for a Leviathan blossom for the spell to trap Chuck. but we find out in 17-Unity that there never was any way to trap him, the spell was something Chuck made up for the story. Continuity errors be damned, the only logical conclusion is that he wanted Dean and Castiel go to purgatory.
Chuck wanted Dean and Castiel in Purgatory, where Dean feels his emotions purely and can express himself. Dean prays to Castiel (which Jensen called Dean's confession) then goes to tell Castiel something. If Dean told Cas he loved him, Castiel would have gone to the empty, completely breaking Dean's spirit in a perfect same-episode-parallel to Eileen and Sam.
But he didn't. He didn't because Castiel stopped him.
Castiel broke the narrative, Castiel broke Chuck's narrative, again. And that is why Chuck is so completely pissed at Castiel in Unity.
















