Animals do get tooth cavities, and for the same reason that people do, even without a sweet diet.
Bacteria build up on the teeth and cause decay, although they may be different bacteria from the ones that cause human cavities.
It is recommended that most pets including dogs and cats have their teeth cleaned.
In a relatively recent development, a few veterinarians specialize in dental care for animals, but most veterinarians do some dental care for pets such as dogs.
Pets may also need periodontal treatment for gum disease.