Narrated Abu Hurairah: The Prophet ﷺ as saying: Walk quickly with a funeral, for if the dead person was good it is a good condition to which you are sending him on, but it he was otherwise it is an evil of which you are riding yourselves.
We can also learn from this hadith that our actions have consequences and that even small deeds can make us accountable for our actions on the Day of Judgment. It teaches us to always strive for righteousness and do what is right even in small matters such as attending funerals or other gatherings where respect needs to be shown towards others.