I planned to cover this in the S&S entry for A Scandal in Belgravia, but I’ll do it now…
It’s EXTREME heartbreak music. And because it’s so extreme, it’s used sparingly: we only ever hear it three times, iirc:
1. the hiker deduction (this is the big thing)
2. Mycroft being devastated by Moriarty’s text
3. Sherlock’s epiphany that it’s about to be “too late” when he drops his champagne glass before toasting John’s marriage (sound here)
So what about that hiker, eh? What could that possibly do with heartbreak? Well, we know it’s got something to do with something important because a lot of time is spent on it and it has NO relevance to the plot of ASiB.
It’s actually my favorite subtext in the show, because it’s a tricky one: it’s BEAUTIFULLY constructed and terribly clever. The hiker and the client who sees the hiker are both mirrors for John, but separate parts of him. I’ll set up why each is a mirror, and then explain what’s going on in the scene.
Then for the hell of it, I’ll tell you John’s other mirror in the episode, because it’s a quick one. This is pretty long (pictures and videos, too), so here’s a cut: