Will need to check those corpses for additional intel concerning: causes of death, identification, if hostages, if foreign fighters, etc.. Quite probably, due to combat conditions, those dying, whoever they might have been, could not safely be buried in a more traditional way. So temporary graves, served as enlarged morgues, to keep the corpses until after the war. Valuable intel can be derived from the biopsies.