Not all humans want to hang on to life especially if they are terminally
ill. I know of at least two people who's last wishes were to peacefully
pass away.
The difference is that humans can make their wishes known. A dog
cannot. That became the determining factor with my lab. His few "good
moments" were far outnumbered by bad ones and he was in pain despite
medication. It wasn't fair to him to listen to him whimpering at night
in his bed.