The aloe probably helped with it a lot. Aloe is often used for treating burns. :)
That probably happened because some of the substances could not mix and had different densities. Like oil on water.