The sad thing is that all hamsters have that trait where getting a tumor is inevitable. We owned a dwarf hamster (life span is like 2-3 years, he lived up to almost 5). He had 2 or 3 tumors when he started getting older and kept having constant seizures before he passed
But factually, it's kind of sad knowing that all hamsters can get tumors pretty easily because it runs in their genes. Some get them quickly, while others get them in a longer span of time. And I'm sorry for your loss; just know that you were there for him and you did what you could.