The reason Sherlock had a new scarf when he came back was because he gave his old one to Molly before he left. She never wore it, of course. She thought people might be suspicious or think it was creepy when he was "dead." And then Tom happened. After everything was cleared up with the "Miss Me" situation, he knew she'd really forgiven him for everything when she showed up at 221b wearing it.