Why not?
End of life care is different from "normal" care. Hell, it's a specialization with its own name: palliative care.
And you know the most likely outcome is the person going through the same torturous ordeal again, switching over to palliative is a reasonable decision grounded in medical ethics.
Had this happened in any other way the police would be called and the perpetrators put in prison, which is improbable in this case for obvious reasons. And this wouldn't be possible in a non-backwards society.
Hmm...
I'd wager KYC applies either way (anyone placing a bet should be known, not just who ends up winning) and not paying out wins is a clear breach of contract.
So very clearly doubly illegal. First they let any rando gamble, and then they don't pay out wins.