In the following text, the Nikāya Buddha makes a strong statement as to why he encourages mindfulness of death.

Mindfulness of Death,
Anguttara Nikāya
, 6.19.
Translated from Pāli by Christopher J. Ash

Once the flourishing one was staying at Nādika, in the brick hall, where he addressed the mendicants:

“Practitioners!”

“Yes, Sir!” they responded.

“Mindfulness of death, Practitioners, if practised and developed, brings great benefit and fruit , merging in the Deathless. Mindfulness of death comes to a head in the Deathless. So, Practitioners, you should cultivate mindfulness of death.”

After these words, one mendicant said to the flourishing one: “Bhante, I practise mindfulness of death.”

“So, Practitioner, how do you practise mindfulness of death?”

“I think in this way, Bhante: ‘Oh, may I live just for one day and night [more], to keep the flourishing one’s teaching in mind. I could accomplish much, indeed!’ In this way, Bhante, I practise mindfulness of death.”

[Other mendicants in the assembly also presented their approach to the practice of mindfulness of death:]

“I think in this way, Bhante: ‘Oh, may I live just for a single day [more]…

“Oh, may I live just for the time I need to eat one single alms meal…

“Oh, may I live just for the time needed to chew and swallow four or five mouthfuls of food…

“Oh, may I live just for the time I need to chew and swallow one mouthful of food…

“Oh, may I live just for the time it takes to breathe in, after the out-breath; or to breathe out, after the in-breath…”

[They said:] “…to keep the flourishing one’s teaching in mind. This way, I could accomplish much, indeed!’ In this way, Bhante, I practise mindfulness of death.”

After the mendicants had spoken in this way, the flourishing one said:

“The practitioners who say that they practise mindfulness of death with the thought, ‘Oh, were I to live just for one day and a night [more]… … just for a single day [more]…  …just for the time needed to chew and swallow four or five mouthfuls of food… to keep the flourishing one’s teachings in mind. I could accomplish much, indeed!’, of these practitioners it needs to be said that they live carelessly. In respect of destroying the taints, they cultivate mindfulness of death in a slack way.

“But, Practitioners, those who practise mindfulness of death with the thought, ‘Oh, may I live for the time I need to chew and swallow one mouthful of food… or, for the time it takes to breathe in, after the out-breath; or, to breathe out, after the in-breath… to keep the flourishing one’s teaching in mind. Much, indeed, could then be done by me!’, of these practitioners it can be said that they dwell carefully. In respect of destroying the taints, they practise mindfulness of death intently.

“Therefore, mendicants, you should train yourselves thus, ‘We shall dwell carefully; and, for the aim of destroying the taints, we shall practise mindfulness of death intently!’ Thus should you train yourselves.”