One of John's old friends from before Sherlock runs into John one day and they catch up. As you do, they start hanging out etc and John really hopes his friend and Sherlock can also become friends too. Sherlock unwillingly spends some time with this person for John's sake but even John can't ignore how uncomfortable Sherlock is. The truth is that John's old friend had once forced himself on Sherlock. It was when Sherlock was much much younger, perhaps in uni and much alcohol was involved. Maybe he doesn't remember Sherlock at all, but Sherlock will never forget.
Sherlock doesn't explain his behaviour and would rather John believe he's rude than break John's memory of his friend.
John's old friend once raped Sherlock, no one knows
Sherlock doesn't explain his behaviour and would rather John believe he's rude than break John's memory of his friend.