Sherlock has notecards! The extreme mega-mind that knows and remembers everything he has ever read/seen/heard and he has notecards so you can make sure he remembers because John is that important to him.
Sherlock season 3 episode My exact thought on why he told him. And my personal opinion that Sherlock would enjoy the irony of telling only ANDERSON of all people the truth of how he faked it. <--- i loved that that's who sherlock told
I don't necessarily agree with this but it did make me think about it. I believe that John's relationship with Sherlock pulled him out of a very bad place but that this relationship made him strong enough to continue on after Sherlock's death.