In "The Empty Hearse" (Season 3, episode 1) the following occurs:
Anderson (abruptly stopping crying and looking round): Hang on.
(He stands up and walks over to his wall of papers.)
Anderson: That doesn’t make sense.
(Behind him Sherlock rolls his eyes and quietly sighs with an exasperated sound.)
Anderson: How could you be sure John would stand on that exact spot? I mean, what if he’d moved?
(Sherlock turns and quietly leaves the room.)
Anderson (oblivious to his departure): Hey – how did you do it all so quickly? What if the bike hadn’t hit him? (Suspiciously) And anyway, why are you telling me all this? (He chuckles.) If you’d pulled that off, I’m the last person you’d tell the truth ...
(Turning around, he trails off when he realises that he’s alone in the room. He stares for a moment, then chuckles. He switches between looking at all his paperwork and looking to where Sherlock had been standing.)
Anderson (quietly, sounding amused): Sherlock Holmes!
(He chuckles again, pointing to the spot where Sherlock had just been standing.)
Anderson (even softer, with a combination of amusement and exasperation): Sherlock!
(His chuckle slowly develops into laughter, and then into hysterical laughter as he starts tearing at the papers on the wall, ripping them off and whooping and giggling. Eventually he collapses in the corner, rising up onto his knees to continue clawing at the papers and still laughing hysterically until he slumps back down again.)
(Transcript from https://arianedevere.dreamwidth.org/44665.html)
Why does Anderson react in this way?