Death erected a psychological wall inside Sam's mind to serve as a blockade between Sam and his memories of his time in the cage, as his time there was so horrific that remembering what happened would mess him up severely. Even Castiel commented that even he wouldn't know where to start with healing him.
Castiel later split the psychological wall by touching Sam's head, and the wall completely dusted to bits over time due to the constant hallucinations Sam was forced to endure.
- This wall would've eventually faded on its own, as it, like everything else, besides Death, isn't eternal.
- By Death's comment, hypothetically, Death would give any human individual in need of such a wall the chance to have one erected in their mind.
- Castiel, a seraph, was able to split the wall by touching Sam's head, meaning the wall must've not been that strong.