Cats (and many other animals), still possess some wild instincts. To be ill is to be weak and vulnerable--a bad thing in the wilds. So, they will often find a place to hide when they don't feel well, not knowing or understanding that they are so ill they may die. But in doing so, they feel safe from predators.
Our kitties are all indoor-only, but we had a cat who passed in 2008 of a mystery illness at only 4-1/2 years of age. When she was not feeling well, we'd often find her hiding under the couch, or in the back of the closet.
We humans are the only ones who obsess about death and dying, and attempt to forestall it or prepare for it. Other animals know death only when it is upon them, or when they witness the death of a companion.