There are three disasters and nine disasters in the world. If you survive the disaster, you will attain enlightenment and become an immortal. The Bodhi Sutra is the method to overcome the disaster.
The same is true for humans, and so is the demon. It's just that if the demon wants to survive the catastrophe, it must first transform into a human form.
It is said that as long as you eat Chen Xuan, you can skip the transformation, reach the sky in one step, and become an immortal.