There are many hard barbs on the cat’s tongue called filamentous mastoids. Its function is mainly to act as a comb to comb the fur and to scrape the meat on the animal’s bones.
Cats are lone predators, but because they are too small, they may become prey for other animals, so cleaning helps to reduce the body’s odor and is not easily detected.
Dogs evolved from collective hunting wolves, and combing is less important to them, so the dog’s tongue is as smooth as other animals.