People usually chant this when someone not related to them dies. When someone who is our own or related to us dies, then we do not remember this.
It is good, that at the time of someone else’s death everybody remembers that the name of God is the only truth and everything else is ephemeral and not permanent.
This custom was started to make people realize this. It happens only in North India, not in South India. In the South, they observe silence when someone dies.