Was the sad ending really necessary?
He probably would not have died had they gotten him to a hospital. I suspect the beating he received ruptured one of his organs and that he was slowly bleeding internally and had they gotten him to a hospital even one day before he died he might have lived. The surgeons could have saved him. If he was extremely badly hurt as in beyond saving he would not have lasted a few days before dying as he did.
Yes I get it, they were criminals on the run and going to hospital means getting caught but maybe they could have used some of that money to bribe a doctor, make some kind of deal that if they pay the doctor a million dollars he treats my friend's injuries and does not tell anyone. In the movie HEAT Robert De Nero found a doctor to treat his friend Val Kilmer's injury. He was probably a corrupt doctor who did it for under the table bribe money or something.
How many years would he have gotten really? five maybe? Maybe he could have said to his friend "I think I am dying, I need medical care. I am going to turn myself in. Then they could make arrangements to see each other in a few years when he gets out of prison to give him his share of the loot. Being good friends who love each other (this was a bromance movie) there is no danger of Clint not honoring that commitment.