Why did ancient cultures burn their dead?

In many ancient cultures, burning the dead was seen as a way to honor the deceased and to ensure their safe passage into the afterlife. Burning the body was believed to purify the soul and release it from the physical body. In some cultures, burning the body was also seen as a way to prevent the spread of disease.