Some time after Sherlock and John have begun a sexual relationship, John gets an invitation for some social occasion where it's expected for him to bring a date. He tells Sherlock about it, and Sherlock says, "Well, I'm sure [insert female name] will be happy to go with you."
John is hurt that Sherlock doesn't even consider it, but eventually he find out that Sherlock didn't realise John wanted him to come. Because of how vehemently John always denied they were a couple and now he always avoids physical displays when other people are around and never tells anyone that they are together, Sherlock assumed that John's ashamed of their relationship and is only in it for the sex until he finds someone better.
Sherlock/John, misunderstandings
John is hurt that Sherlock doesn't even consider it, but eventually he find out that Sherlock didn't realise John wanted him to come. Because of how vehemently John always denied they were a couple and now he always avoids physical displays when other people are around and never tells anyone that they are together, Sherlock assumed that John's ashamed of their relationship and is only in it for the sex until he finds someone better.