Choices, not actions. Choices can include inaction, as well as a given viewpoint or a lifestyle. If you live a life of crime, and then die from disease while in jail, then your choices led to your death for our purposes. Accurate foresight into the possible consequences of one's choices is not required; indeed, most commonly, it is absent because if the character was capable of seeing and understanding the true possibilities then they probably wouldn't make that choice. It also does not absolve responsibility from the person who does the killing; that's not the point. The point is, characters don't die from someone jumping out of an alleyway and murdering them for shock value. A character's death is the culmination of their story, and should be handled as such.

Malack dies because his settled comfortable life leads him to both underestimate his enemies and ignore his own vulnerabilities. Roy dies because he is given the chance to back out of a battle that is clearly over his head and he refuses. Durkon dies because he trusted Malack to not mess with his spell research. Zz'dtri dies like he lived, as Nale's loyal follower and without much story of his own. Shojo dies because of a lifetime of lies and deceptions, the most important of which was telling a random orphan girl that she was Special and Chosen. Nale dies because he doesn't recognize the privilege he has been living under his entire life. Crystal dies the first time because she can't help but continue to threaten Haley even as they have a truce, and the second time because she can't help being a sadistic killer. Bozzok dies because he chose not to consider his follower's well-being at all. Tsukikko dies because she can't avoid gloating, and because she trusts the undead. Therkla dies because she won't pick a side.

Character deaths are a function of that character's traits, not random. Their deaths flow logically from their flaws. That's all it means.