They are undertaken so that the health service is not overwhelmed with cases. When that happens (as in Italy), you need to triage infected and let some number of people die, who otherwise would not have died. So it is best avoided.
They're lifted after most of the population has already been infected and the disease has run its course (as in China).
Presumably as soon as the number of patients requiring ICU goes above the number of available ICU beds then those kind of measures must be taken - even though its clearly a pretty terrible choice for someone to have to make.
They're lifted after most of the population has already been infected and the disease has run its course (as in China).