The reason that, what asked to "play you" by Euros, Sherlock plays Irene's theme is because Irene helped him realize that John loves him. He composed that in thanks to Irene, and when she texted him again in The Lying Detective, these feelings were shown again. They were shown again in John's speech, and in John telling Sherlock that chances are gone before you know it. "Have you had sex?" His level of intimacy with John is so sexual it goes into his playing. This song is him realizing his feelings for him. The violin has been his way of expressing his feelings for John. Through the Waltz, then manipulated in the score of the Six Thatchers, and a little bit again in the Lying Detective, it's his heartbreak and fear of losing John. Irene's tune is just the opposite. That's why she's brought up at the end of the Lying Detective, and again in music in The Final Problem. Sherlock is hopeful once again.