Salat al-Janazah (Arabic: صلاة الجنازة) is the funeral prayer held by Muslims before the burial but after the shrouding of the body.
Muslims do this so their soul can rise to Allah.The people prying ask for forgiveness from Allah to let te person go to heaven.