The shelter will have helped with medical costs
Pets from shelters almost always come with all of their vaccinations completed. Many shelters will spay or neuter the dog for you, as well. Any health problems that the dog arrived at the shelter with have at least started to be treated. Just think of all that you’ve saved on medical care!