This is the part they didn’t show you in The Final Problem. That rope was for Sherlock to climb down into the well to John. John had been struggling to keep his head clear of the water for a good while, and he was getting exhausted;
"I may be on the side of the angels, but don’t think for one second, that I am one of them.” :( This is soo sad. All the things that people have said to him. Except John; John is the only one who is amazed by him, the only one who sees past his facade.