It could be that the sad person in the dog cartoon is used to convey a message about life's challenges or to evoke empathy from the viewers. Also, it might be part of a character's growth arc.
It could be that they faced a disappointment, like not achieving a goal or not getting something they really wanted. Or perhaps they received bad news.
Often, a sad cartoon can be funny because it plays with our emotions. It might show a sad situation in a way that's so exaggerated or absurd that it makes us laugh. Also, the contrast between the sadness and the humor can be what makes it funny.
Death of a beloved character often makes a cartoon story sad. For example, in some stories, a cute puppy might die, leaving all the other characters and the viewers heartbroken.