Humans think. We rationalize, we remember, we anticipate, we cry, we stress over our past and our future. Dogs and cats are hardwired to respond in the moment. A hungry cat will eat, a stressed-out cat will bite your head off, a territorial dog will bark or bite, a calm and submissive dog will roll onto her back and let you rub her belly.
The reason for this post is simply to ensure we understand that much of what's going on in a pet's head at any moment is fleeting. To illustrate this further: just the other day, a very friendly dog that was delighted to meet me would've taken my arm off while I performed an orthopedic exam on him if it weren't for his muzzle (which his owner insisted I use). Not a nanosecond after removing the muzzle, he devoured a treat and licked my face until I was drenched. His aggressive behaviour towards me was intimately tied with fear... in that moment.
On a similar token, a sick dog or cat will not show behavioral or physical symptoms "out of spite." As smart as we think our pets are, their behavior is much more organic, much more ingrained, and exponentially less conniving than we think. The genes of our pets are constantly firing in massive neon letters, "DO NOT SHOW YOUR ILLNESS TO ANYONE," as they were millenia ago, long before domestication (incidentally, cats are the worst in this regard, rarely showing signs of marked illness until they are deathly ill). If your cat or dog is showing any signs of illness, they are not trying to trick you, annoy you passive aggressively, or trying to be devious with recalcitrant spite. A cat doesn't urinate on your rug from jealousy, and a dog wouldn't hold back his appetite for more attention. They need to see a doctor...
...or this guy.