My thoughts about this are that, because Death and Mort had effectively switched roles, Death got to experience what it was like to be human. This is a turning point in the books for Death, and without giving too much away, his attitude to humans changes from this book onwards. Maybe he realises, from his experiences, that humans do things - sometimes illogical things, because of what they feel inside. Death experiences trying to find happiness and fulfilment, and eventually finds it working in a kitchen - an unlikely job, but he genuinely enjoys it. That empathy he learns gives him, at least a little understanding of why Mort did what he did. As to why Death chose someone who didn't have much time left - well, as we see from Albert and Ysabelle, humans don't die when they are in Death's realm. Their lives are on hold until they go back to living as humans again. That seems like a good enough reason for choosing someone who didn't have much time left. Mort won't die when he's in Death's realm and he won't die when he's standing in for Death while doing the Duty.
I'll just say at this point that this is not the last we'll see of Mort and a future book may go some way to explaining what happened at the end of this book. :shhh: