Maybe the Universe or God or whatever you want to call it sent this dog in need to you for a reason. Maybe he was meant for you and to help you through this rough time while you help him through his rough time. Obviously Ric knew you are a dog person and would help him and the other dogs knew it too and thats why he hid behind you and the attackers left.