although it may be used in place of "I hope you feel better" or "I'm sorry you're sick", it functions more properly as "get better soon because your sickness is grossing me out"
Friend B: "Don't die."
Friend A: "I'll do my best."
Friend B: "Good. I don't want your death on my hands. I'm too lazy to take you to the hospital."