My first thought when I saw that scene was that he was practicing dancing to it just to make sure it was…well, a “danceable” composition, if that makes sense. Checking the tempo, feel, rhythm, etc. This is his gift to John and Mary and, just like his speech, he’s terrified of screwing it up.
As to your other questions…ugh. UGH. That whole “I taught him conversation” at the end of TSoT conversation just wrecks me. I mean, this has just happened:
Sherlock’s true feelings are briefly written all over his face, and John absolutely cannot deal. He looks down, has a second of wait, what? glances back up to confirm he’s seeing what he thinks he’s seeing, and yeah. He can’t look. He can’t face those feelings.
Sherlock sees that, and he gives John an out. He tells them to go dance. Mary (very considerately) asks “what about you?”, they joke about there being “limits,” and then the tutoring conversation happens.
Here’s how I read it (lining up the dialogue with the gifs):
SHERLOCK: “Don’t worry Mary, I have been tutoring him.”
JOHN: “He did you know…”
JOHN: “Baker Street behind closed curtains.”
I put a delay on the last frame. It lines up with John’s “closed curtains” comment. See how Sherlock’s kind of trying to laugh along until John makes that joke? He glances at John with a confused, almost hurt expression here.
John, meanwhile, has gone into full-on bro mode. It’s his way of utterly denying what he’s just read on Sherlock’s face. His shield is fucking UP. I love John Watson dearly, but I have a hard time watching him here, because he’s truly being a dickhead.
JOHN: “Mrs. Hudson came in one time.”
JOHN: “Don’t know how those rumors got started.”
A careless glance at Sherlock, a dismissive joke about their dance lessons and years of rumors about their relationship, a flippant laugh (seriously, listen to the way he laughs there, it’s SO not his normal laugh)
brush it off, never meant a thing, face the wife, face AWAY from Sherlock, don’t look back don’t look back don’t look back
He gets super affectionate with Mary. And yes, I know, it’s their wedding, they’re dancing, they’ve just learned she’s pregnant. But we’ve seen John act affectionate with Mary and this is different. John might as well have NO HOMO stamped on his forehead here.
He. Can’t. Deal.
And Sherlock knows it.
Did he imagine, after their lessons, maybe getting the chance to dance with John at the reception?
Possibly. Probably. He did just tell Janine (and us viewers) that he loves to dance and has been “living in hope for the right case.” Well, he’d solved quite a case this evening.
And after all, John had danced with him before during their lessons. Maybe Sherlock thought John was comfortable with it – comfortable enough with his own sexuality, whatever he considers that to be – to dance with his friend at his wedding reception, his best friend, his best man. It doesn’t mean anything unless it means something.
But no, that was “behind closed doors.” Can’t let anyone see that, nope. That’s how those rumors got started. Those silly, meaningless rumors that meant absolutely nothing, just everyone in the world reading too much into this totally platonic friendship, right mate?
Maybe they could’ve danced in front of everyone, because it wouldn’t mean anything. Except John read the real meaning on Sherlock’s face, and nope, not gonna happen now, can’t face that, can’t deal, shields up.
Because it would have meant something to Sherlock. Just like it did “behind closed doors.” It means everything. And he doesn’t care who knows, not anymore.
But John cares. Right, Sherlock? John cares who knows. He cares what people think. It really bothers you. What? What people say.
It still bothers John. He can’t deal with Sherlock’s feelings, and he can’t deal with his own. John’s shield is up and who knows if he’ll ever lower it again. And Sherlock accepts that, and he respects it, and he does the only thing he can do now.
Well. I didn’t mean for this meta to happen. Time to go cry into my soup.