When you're walking with a dog, you generally keep it on a short leash. Why? If it decides it wants to lunge at another person, it gives you a chance to retract the leash and protect the other person from your dog's attack.
Unfortunately, not all people consider the possibility of a pet attacking someone. Take for example this dog-bite incident in Connecticut. A man reported that he was bitten by a dog while he was jogging. He had been on a sidewalk adjacent to another person and their dog.
The man moved over from the sidewalk and into the road to avoid the dog. However, he was still too close. The dog's leash was loose enough that it was able to lunge at him and bite his hamstring.
Initially, the woman didn't realize that her pet had attacked the man. The bite victim reported that the dog's owner was on her phone at the time. The man had to seek medical attention. Animal Control has followed up with her.
Incidents like this are fairly common, because animals aren't always predictable in new situations or when they encounter people they don't know. If strangers approach, especially quickly, you need to be ready to restrain your pet.
If you are bitten or injured by another person's pet, it is their responsibility to make sure that you are not left to foot the bill. They are responsible for their pet's actions, and they can be held liable for any medical care, lost wages or other financial losses as well as damages that result from the incident.