Oh, I made myself sad again...
Sherlock buys Toby after Victor moves out because as much as he hates to admit it, he misses him and the blasted dog that chewed on his ankle repeatedly. So when the opportunity to buy Toby comes up he does, he doesn't think about it effecting anyone else because he wants to be selfish, to be happy, to be able to protect the little puppy that no one else wanted (don't get me started on how much he wants to be a father, and how Toby is his makeshift child because there will be tears). So yeah, Toby is someone he can depend on, someone he can hold and cry on when he has a rough night, he's a reason to stay sober... I have a lot of feels about this puppy okay?