Not pets, but I greet the wild birds around here with “Gmorning, boids” or something. The reason is simple: I hate being a bother, even to animals, and the birds are less likely to be scared and fly away if I speak to them.
Also when I lived with cats, no cat who was let out would ever forget to say “mrr”, which I interpreted as a “thank you”. Of course I responded to them like I would a human.