First of all, it should be clear that Islam, as a divine religion, respects man when alive or dead. It’s totally rejected in Islam for one to show any sign of disrespect or harm to a dead body. Beginning from the time of Prophet Adam until the last Prophet, Muhammad (peace and blessing be upon them all) burying the dead has been the prescribed method of conveying the deceased to their graves.
Before answering your question, we’d like to cite the translation of the whole verse you referred to which will help in understanding the context of this incident as well as the lessons it aims to convey: “Then Allah sent a crow digging up the earth so that he might show him how he should cover the dead body of his brother. He said: Woe unto me! Am I not able to be as this crow and cover the dead body of my brother? So he became of those who regret.” (Al-Ma’idah: 31)
Dr. Muhammad Sa`eed Hawwa, professor of Shari`ah at the University of Mu’tah, Jordan, states that: “This (story of Abel and Cain) was the first incident of murder on earth. One of the rights of the dead is to be honored, and honoring the dead is to bury him or her. So, despite that the crime of murder had taken place, the dead had to be honored and preserved to save his body from being decayed on earth.
Thus, what Almighty Allah did in this case was to honor the corpse of the deceased and not to conceal the crime. Moroever, the crime was not in need of concealment as there were no people on earth at that time except those two sons and their father.
The other reason for sending the crow was to let the murderer feel sorry and remorseful for the heinous crime he committed, and this message was properly conveyed by making him learn from the crow that the corpse had to be buried.
Therefore, it’s clear from the above explanation that there were two reasons for the incident: to honor the corpse of the deceased (through burial) and to make the murderer feel sorry and have self-compunction for the crime he committed.”