They are perfect for eache other. And Sherlock trusted only Molly with the fact that he thought he was going to die and he needed her. Molly is very loyal to him. And they work togther, sometimes, in the morgue. There is also a very beautiful video made for them which is also a story: Hope
In the end, Molly is the one person Sherlock goes to for help. She is the only know wewe knows that he believes he's going to die. John is best friend, but Sherlock doesn't even let him in on the truth. Only Molly. Molly has put up with so much from him, yet she continues to be loyal and caring. She's the only one who saw his pain. And try as he might, Sherlock can not truly hide the fact that she does count. He trusts her. He always has.