I am sorry to hear about your grandfather.

However, maybe he knew that it was coming and he didn't want to live the last few weeks of his life living by some doctor's strict diets. At least he continued doing the things thqat made him happy before he died.
My Father-in-law passed away from cancer a few years ago, and the doctors told him to stop doing this and that. However, he said he wanted to contiune to eat the things he wanted and do what made him happy before he died. He died happy. Maybe this is what your grandfather was doing.