Although the vast majority of overweight dogs and cats are healthy pets that get that way because of their lifestyles; there are some that get that way because they must receive medications to control serious diseases. Those are the dogs and cats receiving corticosteroid medications like prednisone, prednisolone, methylprednisolone, etc. (all end in –sone). Some of those are pets that have severe skin allergies (canine and feline atopy), others have chronic inflammations of their intestinal tract (inflammatory bowel disease=IBD, etc.), some have cancers of the immune system (eg lymphoma) and others have autoimmune disease in the lupus group. Any pet receiving those medications in significant amounts over extended periods of time will have the urge to eat more and, if the extra food is there, gain weight. Although much of that added weight is fat, some of it is fluid (edema). Pete and Repeat's article pertains to those pets on steroids too.
Corticosteroids also increase your pet's thirst and it will pee more. But never be tempted to restrict your pet’s access to water – that can cause dangerous dehydration.