I'm so sorry for such an early loss of your snake. Even if your vet had diagnosed his disease while he was alive, I doubt that it would have changed the outcome.
Life really isn't fair, that's for sure. Snakes can regurgitate for any number of reasons...fairly benign ones like prey too large, handling, & temperatures too cool,
or very serious illnesses like crypto or cancer, etc. At least he was with you for a while...long enough to know a good life, instead of neglect. You did right by him.
Rest in peace, Khyan