Originally Buddhist. It means that good people go to heaven after death and evil people go to hell after death. Buddhism is used to persuade good and punish evil. Later, it is often used to compare the two opposite life situations of happiness and misery.