This tradition was started by the need to bury a body as soon as possible in the Middle East were the ambient temperature is high. At the time there were also no funeral parlours with cool storage facilities. Like many Jewish and Muslim customs the initial reasons were health & hygene related.