If you're curious - this practice is so you don't squander your life. Reminders of death are uncomfortable so we tend to avoid them - but they can properly spur us to life with vigor in the time we have.
When I was an athiest, I thought it was good advice at the time.