It was narrated from 'Uthman that he saw a funeral and stood up for it and said: I saw the Messenger of Allah ﷺ see a funeral and stand up for it.
The Prophet Muhammad (PBUH) was known to stand up whenever he saw a funeral procession pass by him as an example of how we should behave in such situations. He also encouraged others to do so out of respect for those who had passed away and their families who were mourning them. This act of kindness shows that we are all connected regardless of our differences or backgrounds; thus, reminding us that we should treat each other with love and compassion at all times.