Question: how did the sword of gryffindor end up in the lake?
Answer: Once Snape knew where Harry was camping, he needed to create the conditions of need and valor for the sword to be retrieved. He uses his Patronus to lure Harry and leaves the sword at the bottom of a frozen lake. ... He saves Harry from drowning, gets the Horcrux off him and retrieves the sword of Gryffindor.