This sequence is funny and sweet, but demonstrates a few things so clearly and painfully.
John plays incredibly close to the chest about his feelings. He apparently never explicitly told Sherlock what his role in his life is, or how important he is, preferring to let actions speak louder than words and assuming his meaning is clear. To everyone else, it is clear.
John severely overestimates Sherlock’s ability to understand how anyone feels about him. John makes a lot of assumptions about Sherlock’s emotional maturity and abilities, all of which are apparently wrong.
Sherlock has stupidly low expectations of how people he loves feel about him. It’s a bit hard not to launch into a consideration about Sherlock’s sense of self-esteem at this point. It seems fairly clear that Sherlock’s sense of self-worth must be based entirely on his intellectual abilities, to the point of sticking his fingers in his ears and humming to drown out anything else.
This conversation may be the core motivation for Sherlock’s actions for rest of the series. All the emotion, all the sacrifice, all the wrestling inside Sherlock’s heart, the beating down the doors of his own life and then throwing it away again, is all because of this conversation. The impact of which John continues to radically underestimate.
These two are so far from being on the same page, I’m not sure they’re in the same library.