Answer :
The Mandate of Heaven gave emperors the right to rule and if they ruled fairly, appropriately without peasant rebellions, barbarian invasion (etc) their mandate would be considered fulfilled. But if any of the examples above happened, they would lose the mandate of heaven.