This is intended to remind us all of our mortality. The church probably hoped that this would increase donations but it has another purpose too. It reminds us not to waste time.
If there is something to be done- do it now. None of us know how long we are here on earth.