I have a 13-year-old rescue pug I got when he was seven. He had been abused and was psychotic. He bit me several times, hard enough to lay the skin open. It took me a year to turn him into a decent dog.
Now he's old and blind and deaf and incontinent. But I'll keep him until he dies.
Some people, when their dog gets like that, dump them at a shelter. Then pug rescues get them and make them comfortable until they die.
I don't understand people who dump their old dogs just because they're not happy healthy dogs anymore. If you don't want to deal with an old dog, then get a stuffed toy one.
Schopenhauer was right.